Ah, sorry I missed that the first time around. There's something similar going on with lazy-seq.
user=> (defn the-seq #_=> ([] (the-seq 2)) #_=> ([a] (cons (* a a) (lazy-seq (the-seq (* a a)))))) user=> (def s (the-seq)) #'user/s user=> (take 100 s) ArithmeticException integer overflow clojure.lang.Numbers.throwIntOverflow (Numbers.java:1501) user=> (take 100 s) NullPointerException clojure.lang.Numbers.ops (Numbers.java:1013) I think in practice, you stop passing around the seq after the first exception, you're encouraged not to hold on to heads of seqs, so this shouldn't get triggered. On Mon, Jun 13, 2016 at 4:54 PM Sebastian Oberhoff < oberhoff.sebast...@gmail.com> wrote: > What's surprising is that I executed a pure function twice in succession > and got different results. Furthermore the second execution papers over an > exception. > > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.