[Haskell-beginners] Re: strange take result--explanation?

7stud bbxx789_05ss at yahoo.com
Thu Mar 12 04:14:41 EDT 2009


7stud <bbxx789_05ss <at> yahoo.com> writes:
> 
> Why does 
> 
> take (0 - 1) [1, 2, 3] 
> 
> produce a result but not
> 
> take -1 [1, 2, 3]
> 
> ?  Thanks
> 

Well, immediately after I hit the submit button, I thought I'd try this:

*Main> take (-1) [1, 2, 3]
[]

So why are the parentheses needed there?






More information about the Beginners mailing list