diff --git a/prospect/examples/bank-account.rkt b/prospect/examples/bank-account.rkt index c16e4da..f5a0f8a 100644 --- a/prospect/examples/bank-account.rkt +++ b/prospect/examples/bank-account.rkt @@ -12,9 +12,8 @@ [_ #f])) (define (observer e _) - (when (patch? e) - (for-trie ([(account $balance) (patch-added e)]) - (printf "Balance changed to ~a\n" balance))) + (when (patch? e) (for [(balance (project-assertions (patch-added e) (account (?!))))] + (printf "Balance changed to ~a\n" balance))) #f) (define (updater e _)