From 95f268c3d55e83ab4a1b1bbf66b9de6f6eae070d Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 19 Nov 2015 17:21:14 -0600 Subject: [PATCH] switch stop-condition to be a keyword argument --- loopy.scm | 2 +- tests.scm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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"))) -- 2.31.1