[Haskell-cafe] Flagstone problem
michael rice
nowgate at yahoo.com
Sat Nov 6 15:28:56 EDT 2010
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 at 2piix.com> wrote:
From: Alexander Solla <ajs at 2piix.com>
Subject: Re: [Haskell-cafe] Flagstone problem
To:
Cc: "haskell-cafe Cafe" <haskell-cafe at 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 at haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101106/42fb4b74/attachment.html
More information about the Haskell-Cafe
mailing list