Giuliani Sanches <giulianisanc...@gmail.com> writes:

> In this code
>
> http://pastebin.com/tJNhabJw
>
> When the second case is executed the output is:
>
> The output is (Juice
> Sandwich
> nil Banana
> nil nil)
>
> Where these "nil" come from ?

The nils are the values of the `for`.  (println item) prints Juice,
Sandwich and Banana, but println always returns nil.  Thus the
comprehension results in (nil nil nil).  Well, and since the printing
happens not before the elements are realized, the output is a bit
interleaved which makes it look strange.

Bye,
Tassilo

-- 
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