diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-10-24 08:01:25 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-10-24 08:01:25 -0400 |
commit | ad59dab0d1494f8c0372bc65b3849a69032ee5bc (patch) | |
tree | 16ed105306ecb3a38358147b132d2925bf914f7f | |
parent | 13b18b33261391ff5f7748336ec0db9e83e03309 (diff) |
helpers: Add trampoline procedure.
* sly/helpers.scm (trampoline): New procedure.
-rw-r--r-- | sly/helpers.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sly/helpers.scm b/sly/helpers.scm index 9192431..d63d470 100644 --- a/sly/helpers.scm +++ b/sly/helpers.scm @@ -30,7 +30,8 @@ logand? define-guardian memoize - forever)) + forever + trampoline)) (define (any-equal? elem . args) "Return #t if ELEM equals any of the elements in the list ARGS." @@ -69,3 +70,7 @@ same thread that is running the game loop." (define-syntax-rule (forever body ...) (while #t body ...)) + +(define-syntax-rule (trampoline proc) + (lambda args + (apply proc args))) |