Hi, Alexander

Your change produces the same sequence of 0s, 1s, and 2s.

mod n 2 == fromEnum (even n)

Michael


--- On Sat, 11/6/10, Alexander Solla <ajs@2piix.com> wrote:

From: Alexander Solla <ajs@2piix.com>
Subject: Re: [Haskell-cafe] Flagstone problem
To:
Cc: "haskell-cafe Cafe" <haskell-cafe@haskell.org>
Date: Saturday, November 6, 2010, 1:40 PM


On Nov 6, 2010, at 4:03 AM, Brent Yorgey wrote:

> Doesn't make much sense to me.  The sum of binary digits in the binary
> representation of n will not be zero very often...

I think they mean "the sum (mod 2)" when they say "the sum of binary digits".  That should be zero "half" the time.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe