Re: The Cons in iterate's return value

2014-04-17 Thread Mars0i
On Thursday, April 17, 2014 10:36:13 AM UTC-5, A. Webb wrote: > On Wednesday, April 16, 2014 10:35:14 PM UTC-5, Mars0i wrote: >> >> >> But then should realized? be able to deal with a Cons containing a >> LazySeq? >> >> (Is this an issue worthy of JIRA? I've never submitted there, and am not >

Re: The Cons in iterate's return value

2014-04-17 Thread A. Webb
On Wednesday, April 16, 2014 10:35:14 PM UTC-5, Mars0i wrote: > > > But then should realized? be able to deal with a Cons containing a LazySeq? > > (Is this an issue worthy of JIRA? I've never submitted there, and am not > sure I know enough to do so. Willing to try to figure it out.) > No, re

Re: The Cons in iterate's return value

2014-04-16 Thread Mars0i
On Wednesday, April 16, 2014 2:39:24 PM UTC-5, gianluca torta wrote: > > this issue on core.typed > http://dev.clojure.org/jira/browse/CTYP-96 > > in particular the

Re: The Cons in iterate's return value

2014-04-16 Thread Mikera
On Thursday, 17 April 2014 04:28:02 UTC+8, John Mastro wrote: > > > I assume that there's a good reason that iterate returns a Cons > > instead of a LazySeq. > > IIUC, this particular case arises because iterate's body is implemented > as > > (cons x (lazy-seq (iterate f (f x > > rather th

Re: The Cons in iterate's return value

2014-04-16 Thread John Mastro
> I assume that there's a good reason that iterate returns a Cons > instead of a LazySeq. IIUC, this particular case arises because iterate's body is implemented as (cons x (lazy-seq (iterate f (f x rather than (lazy-seq (cons x (iterate f (f x Can anyone comment on whether the

Re: The Cons in iterate's return value

2014-04-16 Thread Ambrose Bonnaire-Sergeant
Ah so it seems a "lazy sequence" implements IPending? Thanks, Ambrose On Thu, Apr 17, 2014 at 3:39 AM, gianluca torta wrote: > this issue on core.typed > http://dev.clojure.org/jira/browse/CTYP-96 > > in particular the comment: > "This is starting to make me rethink what a clojure.core docstri

Re: The Cons in iterate's return value

2014-04-16 Thread gianluca torta
this issue on core.typed http://dev.clojure.org/jira/browse/CTYP-96 in particular the comment: "This is starting to make me rethink what a clojure.core docstring means exactly by a "lazy sequence" cheers, Gianluca On Wednesday, April 16, 2014 6:45:01 PM UTC+2, Mars0i wrote: > > The docstring fo

The Cons in iterate's return value

2014-04-16 Thread Mars0i
The docstring for iterate says that it returns a lazy sequence, but it returns a Cons wrapped around a LazySeq. This means, for example, that realized? can't be applied to what iterate returns. Is this a problem with the iterate docstring? Or should realized? be applicable to Conses? I assu