Hi, 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.
Hi, 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.
In Haskell, an identifier starting with an uppercase letter designates a type, whereas a function name has to start with a lowercase letter.