Doing homework I found myself stuck with a problem. I have to go from a basic type to a "more complex" one by unifying them (the professor calls it unifying them). An example with map map:
map :: (c -> d) -> [c] -> [d]
map :: (a -> b) -> [a] -> [b]
By replacing c with a -> b, and d with [a] -> [b] and omitting the first parameter of map, the result is [a -> b] -> [[a] -> [b]] which is what haskell returns when doing :t map map.
On one excercise I have [length, head] which according to :t in Haskell [length, head] :: [[Int] -> Int]
I'm having issues understanding how [length, head] works. It is a list of functions? It performs head to a list and then length is applied to the result?
I couldn't find an example of this working and every time i tried to input a list or list of lists to [length,head] it ends up in error. I noticed that [head,length] has the same type as [length,head] which did not help me understand it.
How is [length,head] supposed to work?