(define %current-agenda (make-parameter #f))
-(define* (start-agenda agenda #:optional stop-condition)
+(define* (start-agenda agenda #:key stop-condition)
(let loop ((agenda agenda))
(let ((agenda
;; @@: Hm, maybe here would be a great place to handle
(set! speaker (speak-it)) ; reset the speaker
(enq! q run-dummy)
(start-agenda (make-agenda #:queue q)
- (true-after-n-times 2))
+ #:stop-condition (true-after-n-times 2))
(test-equal (speaker)
'("I bet I can make you say you're a dummy!\n"
"I'm a dummy\n")))
(set! speaker (speak-it)) ; reset the speaker
(enq! q run-dummy)
(start-agenda (make-agenda #:queue q)
- (true-after-n-times 1))
+ #:stop-condition (true-after-n-times 1))
(test-equal (speaker)
'("I bet I can make you say you're a dummy!\n")))