# Pastebin D6zq8QVp (\f1 xs -> map f1 xs) . (\f2 ys -> map f2 ys) = (.) (\f1 xs -> map f1 xs) (\f2 ys -> map f2 ys) -- Move (.) from operator position to prefix position = (\f g x -> f (g x)) (\f1 xs -> map f1 xs) (\f2 ys -> map f2 ys) -- Expand definition of (.) = ((\f g x -> f (g x)) (\f1 xs -> map f1 xs)) (\f2 ys -> map f2 ys) -- Add parens for clarity = (\g x -> (\f1 xs -> map f1 xs) (g x)) (\f2 ys -> map f2 ys) -- β-reduce = (\x -> (\f1 xs -> map f1 xs) ((\f2 ys -> map f2 ys) x)) -- β-reduce = (\x -> (\f1 xs -> map f1 xs) ((\f2 ys -> map f2 ys) x)) -- β-reduce = (\x -> (\f1 xs -> map f1 xs) (\ys -> map x ys)) -- β-reduce inside the lambda = (\x -> (\xs -> map (\ys -> map x ys) xs)) -- β-reduce inside the lambda = (\x -> (\xs -> map (map x) xs)) -- η-reduce = (\x -> (map (map x)) -- η-reduce