Data update
This commit is contained in:
parent
72eb4943cb
commit
4d5544505c
2347 changed files with 62432 additions and 16731 deletions
|
|
@ -1,3 +1,4 @@
|
|||
(define (make-account balance)
|
||||
(define (withdraw amount)
|
||||
(if (>= balance amount)
|
||||
(begin (set! balance (- balance amount))
|
||||
|
|
@ -12,3 +13,13 @@
|
|||
(else (error "Unknown request -- MAKE-ACCOUNT"
|
||||
m))))
|
||||
dispatch)
|
||||
|
||||
(define acc (make-account 100))
|
||||
((acc 'withdraw) 50)
|
||||
50
|
||||
((acc 'withdraw) 60)
|
||||
"Insufficient funds"
|
||||
((acc 'deposit) 40)
|
||||
90
|
||||
((acc 'withdraw) 60)
|
||||
30
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue