[Haskell-beginners] Re: ghc installation on mac osx 10.4.11(intel), Xcode 2.4?

7stud bbxx789_05ss at yahoo.com
Tue Feb 24 15:27:20 EST 2009


Daniel Fischer <daniel.is.fischer <at> web.de> writes:
>
> 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.
 









More information about the Beginners mailing list