On Wed, Oct 21, 2009 at 1:20 AM, Meikel Brandmeyer <m...@kotka.de> wrote:

> >>>    (repeat (count filters) [])
> > Should I wrap it in (vec ...) or is there a better way?
>
> repeat, map, filter, cycle, take, iterate, etc. are all sequence
> functions. They will turn their argument into sequence (via seq) and
> return again a sequence.


Not all of them turn their arguments into sequences. Repeat doesn't; the
above repeat function will return a sequence of empty vectors, not a
sequence of empty sequences.

The ones that iterate over a collection turn the iterated-over arguments
into a sequence: all but repeat and iterate. Still only those arguments: for
instance, map won't apply "seq" to its function argument. :)

Their outputs are all lazy sequences.

Just to clarify.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to