purescript-profunctor
purescript-profunctor copied to clipboard
splitString/Choice are constrained to categories while they do not require identity
splitStrong
:: forall p a b c d
. Category p -- actually only Semigroupoid required
=> Strong p
=> p a b
-> p c d
-> p (Tuple a c) (Tuple b d)
splitStrong l r = first l >>> second r
splitChoice
:: forall p a b c d
. Category p -- actually only Semigroupoid required
=> Choice p
=> p a b
-> p c d
-> p (Either a c) (Either b d)
splitChoice l r = left l >>> right r