Consider the following code:
step :: [[a] -> [a]] -> [[a]] -> [[a]]
step (f:fs) xss
| (fs == []) = yss
| otherwise = step fs yss
where yss = map f xss
It throws the following error:
No instance for (Eq ([a] -> [a])) arising from a use of ‘==’
(maybe you haven't applied a function to enough arguments?)
|
3 | | (fs == []) = res
| ^^^^^^^^
fs should be either a list of functions or an empty list, so why is the compiler trying to make a function out of it?