Im getting this really annoying error in when I run this Haskell code. For some reason it doesn’t like the fist line delLast :: (Ord a) => [a] -> [a]
delLast :: (Ord a) => [a] -> [a]
delLast [] = []
delLast (x:[]) = []
delLast (x:xs) = [x] ++ delLast xs
Doest anyone know why Im getting this error? Thanks.
This is the error that I get:
parse error on input `='
Failed, modules loaded: none.
Is there an unterminated definition immediately before that line?
Compiling that gives me: