diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-08-17 21:34:54 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-08-25 19:33:08 -0400 |
commit | 8d6b96b91251f62cb063bf6ec38933ed457a1d7f (patch) | |
tree | 0235a25398977bba146a43ea74e286c459a64dbe | |
parent | bc336c2095a15a2a1739755c3725aedf2d9223ab (diff) |
Add forever macro.
* sly/helpers.scm (forever): New macro.
-rw-r--r-- | sly/helpers.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sly/helpers.scm b/sly/helpers.scm index 725ba3f..9192431 100644 --- a/sly/helpers.scm +++ b/sly/helpers.scm @@ -29,7 +29,8 @@ #:export (any-equal? logand? define-guardian - memoize)) + memoize + forever)) (define (any-equal? elem . args) "Return #t if ELEM equals any of the elements in the list ARGS." @@ -65,3 +66,6 @@ same thread that is running the game loop." list))) (hash-set! cache args results) (apply values results))))))) + +(define-syntax-rule (forever body ...) + (while #t body ...)) |