>> when we give an empty vector of seq-exprs to doseq it returns the value of
>> the last s-expression.. but returns nil when the
>> vector-of-seq-exprs is not empty.. may be this is the expected behaviour ..
>> but the documentation states otherwise ..
>
> Yeah, that looks like a bug (either in the documentation or the code):
>   (doseq [] 1) => 1

doseq works just like do when the seq-exprs part is empty. This is
certainly not a bug in the code, but I believe the documentation can
be improved.

Relevant portion of the code:
https://github.com/clojure/clojure/blob/b578c69d7480f621841ebcafdfa98e33fcb765f6/src/clj/clojure/core.clj#L2395

Regards,
BG

-- 
Baishampayan Ghose
b.ghose at gmail.com

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