[Haskell-cafe] Please explain behavior of setBit

Murray Gross mgross21 at verizon.net
Sun Nov 13 01:37:53 EST 2005

On Sun, 13 Nov 2005, Lemmih wrote:

> 'setBit (bit 0) 4' => 'setBit 1 4' => (binary) 10001 => (dec) 17

OK, what you are saying is that I have misinterpreted the behavior of bit,
which I thought only did a conversion, but in fact sets the zero-th
bit of a bit string. I have checked that this is in fact what is
happening. The (now solved) problem is obscure documentation. 

Thank you. 

Murray Gross

More information about the Haskell-Cafe mailing list