From: Christopher Allan Webber Date: Thu, 19 Nov 2015 23:21:14 +0000 (-0600) Subject: switch stop-condition to be a keyword argument X-Git-Tag: v0.1.0~142 X-Git-Url: https://jxself.org/git/?p=8sync.git;a=commitdiff_plain;h=95f268c3d55e83ab4a1b1bbf66b9de6f6eae070d switch stop-condition to be a keyword argument --- diff --git a/loopy.scm b/loopy.scm index 3954fea..99741c4 100644 --- a/loopy.scm +++ b/loopy.scm @@ -303,7 +303,7 @@ (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 diff --git a/tests.scm b/tests.scm index c7fe1cd..a958ea2 100644 --- a/tests.scm +++ b/tests.scm @@ -232,7 +232,7 @@ (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"))) @@ -242,7 +242,7 @@ (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")))