lab8-acc - (let (__________) (define (withdraw amount)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
(define (make-account balance) (define (withdraw amount) (set! balance (- balance amount)) balance) (define (deposit amount) (set! balance (+ balance amount)) balance) (define (dispatch m) (cond ((eq? m 'withdraw) withdraw) ((eq? m 'deposit) deposit))) dispatch) (define (make-account init-amount)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (let (__________) (define (withdraw amount) (set! balance (- balance amount)) balance) (define (deposit amount) (set! balance (+ balance amount)) balance) (define (dispatch m) (cond ((eq? m 'withdraw) withdraw) ((eq? m 'deposit) deposit))) dispatch))...
View Full Document

This note was uploaded on 11/30/2010 for the course EECS 21281 taught by Professor Harvey during the Spring '10 term at University of California, Berkeley.

Ask a homework question - tutors are online