use trie comprehension in bank account example
This commit is contained in:
parent
aa4e4afdde
commit
874ba60f06
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
(define (observer e _)
|
(define (observer e _)
|
||||||
(when (patch? e)
|
(when (patch? e)
|
||||||
(for [(balance (project-assertions (patch-added e) (account (?!))))]
|
(for-trie ([(account $balance) (patch-added e)])
|
||||||
(printf "Balance changed to ~a\n" balance)))
|
(printf "Balance changed to ~a\n" balance)))
|
||||||
#f)
|
#f)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue