Functor laws
fmap id = id fmap f . fmap g = fmap (f . g)
- module Test.QuickCheck.Property.Common
- prop_FunctorId :: Functor f => T (f a) -> f a -> Equal (f a)
- prop_FunctorCompose :: Functor f => (a -> b) -> (b -> c) -> T (f a) -> f a -> Equal (f c)
Documentation
prop_FunctorId :: Functor f => T (f a) -> f a -> Equal (f a)Source
fmap id = id
It's not possible to generate arbitrary functions. Therefore they are passed as arguments.