[Haskell-cafe] Newbie questions

Crypt Master cryptmaster at hotmail.com
Sat Jul 3 04:38:55 EDT 2004


People say function application in Haskell is written without brackets
but this can be misleading, here you do need brackets to indicate that
'gaSolutionSpace [1,2,3,4,5]' is one argument and not two. So you should
take 5 (gaSolutionSpace [1,2,3,4,5])


Thanks alot, this was very helpfull. It also makes more sense now that I 
looked up the associativity of functions and found it to be left assoc. For 
some reason I assumed it would automaically bracket form the right as such
(take (5 (gaSolutionSpace [1,2,3,4,5])))

but its actually this
(((take 5) gaSolutionSpace) [1,2,3,4,5])

Thanks again.

Tired of spam? Get advanced junk mail protection with MSN 8. 

More information about the Haskell-Cafe mailing list