Reputation:
I'm having some difficulty integrating && within Guards eg:
something :: Char -> Int
something k
| ord k >= 77 && ord k <= 98 = 8
| otherwise = 88
How the heck can i achieve the above without setting off an error?
Cheers.
Upvotes: 1
Views: 1338
Reputation: 150
In Haskell, an identifier starting with an uppercase letter designates a type, whereas a function name has to start with a lowercase letter.
Upvotes: 2