Skip to content

Instantly share code, notes, and snippets.

Created June 17, 2011 17:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/1031908 to your computer and use it in GitHub Desktop.
<amalloy> (doc for)
<sexpbot> ⟹ "Macro ([seq-exprs body-expr]); List comprehension. Takes
a vector of one or more binding-form/collection-expr pairs, each
followed by zero or more modifiers, and yields a lazy sequence of
evaluations of expr. Collections are iterated in a nested fashion,
rightmost fastest, and nested coll-exprs can refer to bindings created
in prior binding-forms. Supported modifiers are: :let [binding-form
expr ...], :while test, :when test. (take 100 (for [x (range 100000000)
y (range 1000000) :while (< y x)] [x y]))"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment