Module

Test.StrongCheck.Laws.Control.Applicative

Package
purescript-strongcheck-lawsDEPRECATED
Repository
garyb/purescript-strongcheck-laws

#checkApplicative Source

checkApplicative :: forall f. Applicative f => Arbitrary (f A) => Arbitrary (f (A -> B)) => Arbitrary (f (B -> C)) => Eq (f A) => Eq (f B) => Eq (f C) => Proxy2 f -> Effect Unit
  • Identity: (pure id) <*> v = v
  • Composition: (pure (<<<)) <*> f <*> g <*> h = f <*> (g <*> h)
  • Homomorphism: (pure f) <*> (pure x) = pure (f x)
  • Interchange: u <*> (pure y) = (pure ($ y)) <*> u