In this tutorial , at the very bottom, the author provides a type of function:
(Num b) => length :: [a] -> b
So you can see that it starts with typeclass "Num b" (at least that's what I think). But when I try to define something like:
(Integral a) => lucky :: a -> String
I get an error message:
Parse error on input `=> '
Who is wrong here?
drozzy
source share