functions as applicative functors (Haskell / LYAH)
First of all, remember how fmap is defined for applicatives: fmap f x = pure f <*> x This means that your example is the same as (fmap (+ 5) (* 3)) 4. The fmap function for functions is just composition, so your exact expression is the same as ((+ 5) . (* 3)) 4. … Read more