So, I have no idea how to formally call this question, but I want to know why my Haskell implementation (Haskell Platform, ghci) can't produce functions like this:
reverse.(foldr (:))
I would expect it to be of the type [a] -> [a] -> [a]
, just as foldr (:)
is.
Now, after all,
reverse.(foldr (:) [])
is of type [a] -> [a]
, just as foldr (:) []
is, so there seems to be some problem with abstracting away two arguments.
Is there a compiler/interpreter flag to have it approach this sufficiently naively, or is what I am trying to do just plainly ambiguous?