From 1b5c489e0db0d0ade45a5396eafcc4d3b12ac552 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 19 Nov 2015 14:05:07 -0600 Subject: [PATCH] Slightly better style --- loopy.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/loopy.scm b/loopy.scm index 6f1516f..5c1455e 100644 --- a/loopy.scm +++ b/loopy.scm @@ -292,11 +292,12 @@ (agenda-run-once agenda)))) (if (and stop-condition (stop-condition agenda)) 'done - (loop - ;; Adjust the agenda's time just in time - ;; We do this here rather than in agenda-run-once to make - ;; agenda-run-once's behavior fairly predictable - (set-field new-agenda (agenda-time) (gettimeofday))))))) + (let ((updated-agenda + ;; Adjust the agenda's time just in time + ;; We do this here rather than in agenda-run-once to make + ;; agenda-run-once's behavior fairly predictable + (set-field new-agenda (agenda-time) (gettimeofday)))) + (loop updated-agenda)))))) (define (agenda-run-once agenda) "Run once through the agenda, and produce a new agenda -- 2.31.1