On Nov 18, 1:26 am, Robert Ewald <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Doing some small experiments I stumbled over map returning a lazy seq instead
> of performing the function. I had to convert that to a doseq. Is there any
> rationale for not having an eager map. Or was I just not reading the docs
> properly?

you can use either doall or dorun depending on whether
you need the results or just want to force side-effects:

For example, compare:
(dorun (map println ["This" "is" "an" "example"]))
(doall (map (memfn toUpperCase) ["This" "is" "an" "example"]))

Hope this helps
--
Jarkko
--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to