ap package:selective

Recover the application operator <*> from matchOne.
Recover the application operator <*> from select. Rigid selective functors satisfy the law <*> = apS and furthermore, the resulting applicative functor satisfies all laws of Applicative:
  • Identity:
    pure id <*> v = v
  • Homomorphism:
    pure f <*> pure x = pure (f x)
  • Interchange:
    u <*> pure y = pure ($y) <*>
    u
  • Composition:
    (.) <$> u <*> v <*> w = u
    <*> (v <*> w)
Recover the application operator <*> from match.
Update a generalised sum given a generalised product that takes care of all possible cases.
An alternative definition of applicative functors, as witnessed by ap and matchOne. This class is almost like Selective but has a strict constraint on t.
Swap Left and Right.
Inject an ExceptT value into the newtype wrapper.