[Haskell-cafe] List comprehensions with Word8

Jose A. Lopes jose.lopes at ist.utl.pt
Thu May 16 23:15:33 CEST 2013


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?

By the way, I have abbreviated some outputs with ellipsis ...

[1..10] :: [Word8]
[1,2,3,4,5,6,7,8,9,10]

[1..100] :: [Word8]
[1,2,3,4,5,6,7,8,9,10,...,100]

[1..1000] :: [Word8]
[1,2,3,4,5,6,7,8,9,10,...,232]

[1..10000] :: [Word8]
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]

[1..100000] :: [Word8]
[1,2,3,4,5,6,7,8,9,10,...,160]

[1..1000000] :: [Word8]
[1,2,3,4,5,6,7,8,9,10,...,64]

[1..10000000] :: [Word8]
[1,2,3,4,5,6,7,8,9,10,...,128]

[1..100000000] :: [Word8]
[]

[1..1000000000] :: [Word8]
[]

Thank you,
Jose

-- 
José António Branquinho de Oliveira Lopes
Instituto Superior Técnico
Technical University of Lisbon




More information about the Haskell-Cafe mailing list