Skip to content

Instantly share code, notes, and snippets.

@valvallow
Created March 28, 2010 11:35
(use srfi-42)
(do-ec (: n 10)(display n))
; -> 0123456789#<undef>
(do-ec (:range n 1 10)(display n))
; -> 123456789#<undef>
(let ((acc 'pizza))
(do-ec (: n 5)(set! acc (cons acc '())))
acc)
; -> (((((pizza)))))
(list-ec (: x 2 5) (: y 1 x) (list x y))
; -> ((2 1) (3 1) (3 2) (4 1) (4 2) (4 3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment