Module

Test.QuickCheck.Laws.Data.FunctorWithIndex

Package
purescript-quickcheck-laws
Repository
purescript-contrib/purescript-quickcheck-laws

#checkFunctorWithIndex Source

checkFunctorWithIndex :: forall f i. FunctorWithIndex i f => Arbitrary (f A) => Coarbitrary i => Eq (f A) => Proxy f -> Effect Unit
  • Identity: mapWithIndex (\_ a → a) = identity
  • Composition: mapWithIndex f . mapWithIndex g = mapWithIndex (\i → f i <<< g i)

#checkFunctorWithIndexGen Source

checkFunctorWithIndexGen :: forall f i. FunctorWithIndex i f => Coarbitrary i => Eq (f A) => Gen (f A) -> Effect Unit