Skip to content

Instantly share code, notes, and snippets.

@coyotebush
Last active August 29, 2015 14:15
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 coyotebush/d49fc6bbd37300ef8fcc to your computer and use it in GitHub Desktop.
Save coyotebush/d49fc6bbd37300ef8fcc to your computer and use it in GitHub Desktop.
(define-syntax (sdo stx)
(syntax-case stx (in-list)
[(sdo ([name <- comp] ...) final)
(foldr (lambda (n c next) #`(bind #,c (lambda (#,n) #,next)))
#'final
(syntax->list #'(name ...))
(syntax->list #'(comp ...)))]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment