Implementing Haskell's `delete`
I think you're overcomplicating this a bit. Something like delete certainly shouldn't need reverse or ++ to implement.

For the initial list, there are two cases - it either contains an element, or is empty. That much exists in your code. The empty case is simple, just return the empty list:

delete' :: (Eq a) =&gt; a -&gt; [a] -&gt; [a]
delete' y [] = []


Ok, so what about when the list is not empty. Well, in that case, we can simply think about it as follows: if the next element is equal to the element we want to remove, then remove it and return the rest of the list. Otherwise, append the next element and remove the first occurrence from the tail of the list. In code, this looks like:

delete' y (x:xs) = if x == y then xs else x : delete' y xs