Hallo,

On Thu, Nov 29, 2012 at 11:20 PM, Ulrich <umuel...@c007.de> wrote:

> Now should we consider this a clojure bug?
>

It is, see http://dev.clojure.org/jira/browse/CLJ-457

What clojure version are you using btw to get the exceptions?


master from Github with my patch to CLJ-457 applied :-)

Now, that's clear, anyway, the main point was and still is,
> that the code (the version corrected with a base case)
>
> (def primes
>   (cons
>     2
>     (filter
>       (fn[n]
>         (every?
>           #(pos? (mod n %))
>           (take-while #(<=(*%%)n) primes)
>           )
>         )
>       (drop 3 (range))
>       )
>     )
>   )
>
>
> SHOULD imho properly work in a proper clojure implementation,
> n'est ce pas?
>

Genau and it certainly worked in Clojure 1.0 (chunked sequences were
introduced in 1.1).

So, with my patch applied, this code still does not work but at least we
get an exception rather than an incorrect result. Not perfect but, in my
opinion, a step towards correctness (and it should also break some rare
code ("recursive" chunked seqs only) which happens to work by luck).

Christophe

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