[Haskell-cafe] WG:

Stefan Chacko stefan.chacko at hotmail.de
Wed Aug 15 21:06:40 UTC 2018

Dear Haskell supporters,
I have a some question about the definitions in haskell.

  1.  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?
  2.  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

  1.  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<https://go.microsoft.com/fwlink/?LinkId=550986> für Windows 10

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180815/4102afaa/attachment.html>

More information about the Haskell-Cafe mailing list