Skip to content

Instantly share code, notes, and snippets.

@shirok
Last active March 9, 2020 08:06
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 shirok/be818e9be5a4a791d3855be3f28061f8 to your computer and use it in GitHub Desktop.
Save shirok/be818e9be5a4a791d3855be3f28061f8 to your computer and use it in GitHub Desktop.
gosh> (let ((cs '()))
(dolist (x '(1 2 3 4 5))
(push! cs (lambda () x)))
(map (lambda (c) (c)) cs))
(5 4 3 2 1)
gosh> (let ((cs '()))
(do ((xs '(1 2 3 4 5) (cdr xs)))
((null? xs))
(push! cs (lambda () (car xs))))
(map (lambda (c) (c)) cs))
(5 4 3 2 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment