Skip to content

Instantly share code, notes, and snippets.

@cordawyn
Created May 1, 2013 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cordawyn/8c472604b6fa043ebb1e to your computer and use it in GitHub Desktop.
Save cordawyn/8c472604b6fa043ebb1e to your computer and use it in GitHub Desktop.
TAIL?
;;;; Collecting Lists & Streams
(define-syntax collect-list-reverse
(syntax-rules (INITIAL)
((COLLECT-LIST-REVERSE (INITIAL tail-expression) clause0 clause1+ ...)
(ITERATE ((TAIL tail-expression)) CONS clause0 clause1+ ...))
((COLLECT-LIST-REVERSE clause0 clause1+ ...)
(COLLECT-LIST-REVERSE (INITIAL '()) clause0 clause1+ ...))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment