Neither did delay help:

(defn primes [] (let [primes' (atom nil)]
                  (reset! primes' (delay (cons 2 (filter #(prime? (force 
(deref primes')) %) (drop 3 (range))))))))


Serious this is not a bug?

Em quinta-feira, 12 de fevereiro de 2015 22:14:46 UTC-2, Jorge Marques 
Pelizzoni escreveu:
>
> Thanks, Michael, for your analysis and explanation. However not even this 
> worked:
>
> (defn primes [] (let [primes' (atom nil)]
>                   (lazy-seq (reset! primes' (lazy-seq (cons 2 (lazy-seq 
> (filter #(prime? (deref primes') %) (drop 3 (range))))))))))
>
>
>>>  

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

Reply via email to