On Sat, Jul 30, 2011 at 6:02 PM, Bruce Gray <bruce.g...@acm.org> wrote:
> > Yes, Perl 6 does support laziness in this sort of definition, via "run-time > binding". > Very cool. Thanks! > Here is a quick conversion of the Haskell solution into Perl 6; its output > (when run in Rakudo) exactly matches the output of my iterative Perl 6 > solution > (http://rosettacode.org/mw/**index.php/Gray_code#Perl_6<http://rosettacode.org/mw/index.php/Gray_code#Perl_6> > ): > > our multi sub infix:<xor2> ( $x, $y ) { ( $x + $y ) % 2 }; > Why did you need to define this yourself instead of just using +^ ? -- Mark J. Reed <markjr...@gmail.com>