On Fri, 15 Oct 2010 09:16:58 -0400, rgowka1 <[email protected]> wrote:

>But genbin 32 gives an empty list.. works till 31.

That's because Daniel uses values of type Int as intermediate storage
during the computation, and Int values are only 32 bits long. By
replacing Int with Integer (which does not have that limitation), you
can make it work for larger numbers/longer strings:

 genbin n = map (showFixed n) [0..2^n-1::Integer]

-Steve Schafer
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to