develooper Front page | perl.perl6.language | Postings from July 2011

Re: Recursive lazy lists?

Thread Previous
From:
Bruce Gray
Date:
July 30, 2011 18:03
Subject:
Re: Recursive lazy lists?
Message ID:
054F3C02-100B-4535-A8E9-F97BA7A28355@acm.org

On Jul 30, 2011, at 6:40 PM, Mark J. Reed wrote:

> On Sat, Jul 30, 2011 at 6:02 PM, Bruce Gray <bruce.gray@acm.org>  
> wrote:
--snip--
>> our multi sub infix:<xor2> ( $x, $y ) { ( $x + $y ) % 2 };
>
> Why did you need to define this yourself instead of just using +^ ?

Umm, because that is what was done in the Haskell code I was  
translating?
That is my only excuse for my oversight. You are correct; in fact,  
Solomon
Foster already pointed this out to me, and I have already posted the  
revised
version on RC as a second solution:
	http://rosettacode.org/wiki/Gray_code#Perl_6

-- 
Hope this helps,
Bruce Gray (Util of PerlMonks)


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About