
25 May
2007
25 May
'07
10:50 a.m.
L.Guo wrote:
Without thinking about for Word8, [1,18..256] is equal to [1,18..0]. Though I try to use "$!" to let GHC generate the list as Integer. It would not do so. $! merely forces evaluation; it doesn't change the types.
What you want is more like: ws: [Word8] ws = map fromIntegral [1,18..256 :: Int] There is no need for multi-precision Integers here: Int will do just fine. Paul.