
24 Feb
2009
24 Feb
'09
3:27 p.m.
Daniel Fischer
Experienced Haskellers know The default step is 1, and
Thanks for the explanation.
But the last line of the code example is this:
ghci> [10,9..1] [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
which quite clearly includes both endpoints.
They probably meant to write
[10,8 .. 1].
Actually, after examining the text several more times, the code block has three examples: ghci> [1.0, 1.25..2.0] [1.0,1.25,1.5,1.75,2.0] ghci> [1, 4..15] [1,4,7,10,13] ghci> [10, 9..1] [10,9,8,7,6,5,4,3,2,1] and apparently "In the latter case" was meant to refer to the middle example.