Finish the loader.
This commit is contained in:
parent
71e016a3aa
commit
b86360904f
2 changed files with 31 additions and 4 deletions
|
@ -43,8 +43,11 @@
|
|||
;; Bank account is represented as a list with list with the following
|
||||
;; elements: list of transactions, account number, bank code. This
|
||||
;; allows cheap transaction prepending.
|
||||
(define (make-bank-account number bank)
|
||||
(list '() number bank))
|
||||
(define (make-bank-account number bank . maybe-transactions)
|
||||
(let ((transactions (if (null? maybe-transactions)
|
||||
'()
|
||||
(car maybe-transactions))))
|
||||
(list transactions number bank)))
|
||||
|
||||
;; Prepends given transaction to given bank account. It expects the
|
||||
;; transactions list to be the first element of the bank account
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue