On Thu, 16 May 2013 23:15:33 +0200, you wrote: >Hello everyone, > >I was playing with Word8 and list comprehensions and >the following examples came up. I have to admit the >behavior looks quite strange because it does not seem >to be consistent. Can someone shed some light on reason >behind some of these outputs?
When you say <some positive integer> :: [Word8] what you're effectively saying is <some positive integer> `mod` 256 because that's what fits into a slot that's 8 bits wide. So: 1000 `mod` 256 = 232 10000 `mod` 256 = 16 and so on. -Steve Schafer _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe