I'm trying to learn Haskell and I got this error.
parse error on input `='
Here is my code:
nAnd1 :: Bool -> Bool -> Bool
nAnd x y = if (x==False && y == False) || x/=y then True else False
nAnd2 :: Bool -> Bool -> Bool
nAnd x y | if ((x == False && y == False) || x/=y) = True
| otherwise = False
The place where the error takes place is at the "=" before True in nAnd2. Any solution?
ifafter|nAnd1andnAnd2you writenAnd?if ... then True else Falseis just a long way of writing....