Code Review

Compare your solutions

    (define (make-account balance password)
  (let ((attampt 0))
    (define (withdraw amount)
      (if (>= balance amount)
          (begin (set! balance (- balance amount))
                 balance)
          "Insufficient funds"))
    (define (deposit amount)
      (set! balance (+ balance amount))
      balance)
    (define (call-the-cops x)
      "Cops called")
    (define (dispatch p m)
      (if (not (eq? p password))
          (begin
            (set! attampt (+ 1 attampt))
            (if (> attampt 7)
                call-the-cops
                (lambda (x) "Wrong password")))
          (begin
            (set! attampt 0)
            (cond ((eq? m 'withdraw) withdraw)
                  ((eq? m 'deposit) deposit)
                  (else (error "Unknown request -- MAKE-ACCOUNT"
                               m))))))
    dispatch))