Dear Haskell supporters,
I have a some question about the definitions in haskell.
- What is the use of making definitions compared to having no definitions? Is it just like a comment for documation or does it really make a difference in compiling the code?
- What does the arrow(->) mean in such a definition? Is it a binary operation as *, +, -, <,>,= or is it something else? For example there is
sumWithL :: [Int] -> Int -> Int
Does this mean in other words [Int]+Int=Int
- Why do we use clinches in such definitions. I concluded you need clinches if a function is not associative
such as (a-b)+c . (Int->Int)->Int->Int
But also if a higher order function needs more than one argument. (a->b)->c .
Can you please explain it ?
Thank you
Kind regards.
Gesendet von
Mail für Windows 10