On Oct 7, 10:50 am, Hans Sjunnesson <[email protected]> wrote:
> The following code works fine:
> (doseq [x (xml-seq foo)] (println x))
>
> However when I want to do more things in the doseq body, or I simply
> add an extra set of parentheses around the println statement, I get a
> nullpointer.
> (doseq [x (xml-seq foo)] ((println x)))
((println x)) is equivalent to (nil), which means you are trying to
call null.
To specify more than one thing to do within the body, wrap it in a do:
(doseq [x (xml-seq foo)]
(do
(println x)
(whatever)))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
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
-~----------~----~----~----~------~----~------~--~---