[Haskell-beginners] Why is :t 42 ::Num a => a -> a ?

Olumide 50295 at web.de
Sat Sep 24 13:54:08 UTC 2016


Is 42 a function? And if it is why does 42 + 24 work, if both are 
functions. I know there's something I'm getting wrong here.

Also, is the expression abs -42 an error. I initially thought that abs 
to the operator (-) first but there is no space between - and 42. Or is 
there some associativity issue going on here.

- Olumide


More information about the Beginners mailing list