Hey guys so I’m trying to create a simple program to delete the first occurence of a element then return the rest of the list.
It’s been a while and I’m wondering why I’m getting this parse error on line 8
module deleteFirst where
deleteFirst :: (Eq a) => a ->[a] -> [a]
deleteFirst toDelete [] = []
deleteFirst toDelete (a:as) =
if(toDelete == a) then as
else a:(deleteFirst toDelete as)
Any input? Thanks guy
The parse error is on column 8, not line 8, and it is because module names must start with an upper case letter.