How can I understand “(.) . (.)”?
I believe I understand fmap . fmap for Functors, but on functions it's hurting my head for months now. I've seen that you can just apply the definition of (.) to (.) . (.) , but I've forgot how to do that. When I try it myself it always turns out wrong: (.) f g = \x -> f (g x) (.) (.) (.) = \x -> (.) ((.) x) \x f -> (.) ((.) x) f \x f y -> (((.)(f y)) x) \x f y g-> (((.)(f y) g) x) \x f y g-> ((f (g y)) x) \x f y g-> ((f (g y)) x):: t2 -> (t1 -> t2 -> t) -> t3 -> (t3 -> t1) -> t If "just applying the definition" is the only way of doing it, how did anybody come up with (.) . (.) ? There must