When we have the expression:
(fmap . fmap) function nested_functor
I would expect it to translate to something like
fmap (fmap function nested_functor)
Though it surprisingly seems to behave as
fmap (fmap function) nested_functor
Why?
When we have the expression:
(fmap . fmap) function nested_functor
I would expect it to translate to something like
fmap (fmap function nested_functor)
Though it surprisingly seems to behave as
fmap (fmap function) nested_functor
Why?
Well, just look at the definition of
(.)
:So,
Adding an additional argument at the end doesn't really change the equation -- just makes it more specific.
(N.B. function application is left associative, so
f x y
means(f x) y
.)