Законы для функторов


Prelude> fmap id [1,2,3]
[1,2,3]
Prelude> fmap id (Just 42)
Just 42

Prelude> (fmap (+1) . fmap (^2)) [1,2,3]
[2,5,10]
Prelude> fmap ((+1) . (^2)) [1,2,3]
[2,5,10]