It's the laziness; because the value of the call to map is never
consumed, it is never produced either, so the throw never happens.

On Jan 25, 1:05 am, Kei Suzuki <ksd...@gmail.com> wrote:
> Form3 makes me puzzled. Form1 and Form2 throw exception as expected.
> Why doesn't Form3?
>
> Form1: (do ((fn [] (throw (Exception. "oops")))) :ok)
> Form2: (do ((fn [] (map #(when % (throw (Exception. "oops")))
> [true]))))
> Form3: (do ((fn [] (map #(when % (throw (Exception. "oops")))
> [true]))) :ok)
>
> Thanks.
>
> --Kei
--~--~---------~--~----~------------~-------~--~----~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to