Re: Trying to use lazy-seq for the first time, failing.

2009-06-29 Thread Emeka
Thanks, however I have that already :) Regards, Emeka On Mon, Jun 29, 2009 at 2:36 PM, _hrrld wrote: > > On Jun 29, 1:15 am, Emeka wrote: > > Harold, > > > > Do you have any material on Factor? I won't going through it. > > Emeka, > > Many of these links are relevant: > http://www.google.com/s

Re: Trying to use lazy-seq for the first time, failing.

2009-06-29 Thread _hrrld
On Jun 29, 1:15 am, Emeka wrote: > Harold, > > Do you have any material on Factor? I won't going through it. Emeka, Many of these links are relevant: http://www.google.com/search?q=factor+language Regards, -Harold --~--~-~--~~~---~--~~ You received this message

Re: Trying to use lazy-seq for the first time, failing.

2009-06-29 Thread Emeka
Harold, Do you have any material on Factor? I won't going through it. Regards, Emeka On Sat, Jun 27, 2009 at 12:23 AM, _hrrld wrote: > > Hi, > > I'm trying to use lazy-seq to implement a cool piece of functionality > I saw in the Factor programming language. Here is the documentation > for tha

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread Wrexsoul
On Jun 26, 8:23 pm, _hrrld wrote: > Hi, > > I'm trying to use lazy-seq to implement a cool piece of functionality > I saw in the Factor programming language. Here is the documentation > for that > functionality:http://docs.factorcode.org/content/word-produce,sequences.html > > I think a lazy ver

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread _hrrld
On Jun 27, 9:48 am, Meikel Brandmeyer wrote: > Hi, > > Am 27.06.2009 um 02:23 schrieb _hrrld: > > > Am I doing something silly? Or perhaps I've misunderstood lazy-seq's > > operation. > > I think, it's the latter. Here my try on an explanation: > (snip...) I found your explanation cogent and hel

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread Jarkko Oranen
On Jun 27, 3:23 am, _hrrld wrote: > Hi, > > I'm trying to use lazy-seq to implement a cool piece of functionality > I saw in the Factor programming language. Here is the documentation > for that > functionality:http://docs.factorcode.org/content/word-produce,sequences.html > > I think a lazy ve

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread arasoft
I think you just forgot to return the value itself. This seems to work: (defn produce [value predicate generator] (when (predicate value) (let [result (generator value)] (cons result (lazy-seq (produce result predicate generator) ) And I would use "quot" instead of "u

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread Jarkko Oranen
On Jun 27, 3:23 am, _hrrld wrote: > Hi, > > I'm trying to use lazy-seq to implement a cool piece of functionality > I saw in the Factor programming language. Here is the documentation > for that > functionality:http://docs.factorcode.org/content/word-produce,sequences.html > > I think a lazy ver

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread Meikel Brandmeyer
Hi, Am 27.06.2009 um 02:23 schrieb _hrrld: Am I doing something silly? Or perhaps I've misunderstood lazy-seq's operation. I think, it's the latter. Here my try on an explanation: lazy-seq returns a value, which implements ISeq, ie. the seq interface. The code inside the lazy-seq is used to

Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread _hrrld
Hi, I'm trying to use lazy-seq to implement a cool piece of functionality I saw in the Factor programming language. Here is the documentation for that functionality: http://docs.factorcode.org/content/word-produce,sequences.html I think a lazy version of Factor's "produce" word would be super- p