[Haskell-cafe] Weaving fun

Dave Feustel dfeustel at mindspring.com
Tue Apr 10 19:35:37 EDT 2007

I ask this question because I want to program a recently published
algorithm for directly enumerating all prime numbers. The algorithm
description uses infinite sets. The algorithm could possibly be
programmed using lazy evaluation.

-----Original Message-----
>From: Ricardo Herrmann <rherrmann at gmail.com>
>Sent: Apr 10, 2007 7:24 PM
>To: Haskell-Cafe at haskell.org
>Subject: Re: [Haskell-cafe] Weaving fun
>This reminded me of "interleaving" as in:
>Backtracking, Interleaving, and Terminating Monad Transformers
>On 4/10/07, Dave Feustel <dfeustel at mindspring.com> wrote:
>> Talk about synchronicity! I was just wondering whether 'weaving' of
>> infinite lists is possible.
>> eg weave the infinite lists [2,4..], [3,6..], [5,10..]
>> to get [2,3,4,5,6,8,9,10,..]
>> Is this kind of lazy evaluation possible?
>> Thanks,
>> Dave Feustel

http://RepublicBroadcasting.org - Because You CAN Handle The Truth!
http://iceagenow.com - Because Global Warming Is A Scam!

More information about the Haskell-Cafe mailing list