bifunctors-4.1.0.1: Bifunctors

Portability | portable
Stability | provisional
Maintainer | Edward Kmett <ekmett@gmail.com>
Safe Haskell | Safe-Inferred

Data.Bifunctor.Apply

Contents

- Biappliable bifunctors

Description

Synopsis

- class Bifunctor p => Biapply p where
  - (<<.>>) :: p (a -> b) (c -> d) -> p a c -> p b d
  - (.>>) :: p a b -> p c d -> p c d
  - (<<.) :: p a b -> p c d -> p a b
- (<<$>>) :: (a -> b) -> a -> b
- (<<..>>) :: Biapply p => p a c -> p (a -> b) (c -> d) -> p b d
- bilift2 :: Biapply w => (a -> b -> c) -> (d -> e -> f) -> w a d -> w b e -> w c f
- bilift3 :: Biapply w => (a -> b -> c -> d) -> (e -> f -> g -> h) -> w a e -> w b f -> w c g -> w d h
- module Data.Bifunctor

# Biappliable bifunctors

class Bifunctor p => Biapply p where Source

Methods

(<<.>>) :: p (a -> b) (c -> d) -> p a c -> p b dSource

(.>>) :: p a b -> p c d -> p c dSource

     a .> b ≡ const id <$> a <.> b

(<<.) :: p a b -> p c d -> p a bSource

     a <. b ≡ const <$> a <.> b

Instances

Biapply (,) |
Biapply Const |
Semigroup x => Biapply ((,,) x) |
Biapply (Tagged *) |
Apply f => Biapply (Clown f) |
Biapply p => Biapply (Flip p) |
Apply g => Biapply (Joker g) |
Biapply p => Biapply (WrappedBifunctor p) |
(Semigroup x, Semigroup y) => Biapply ((,,,) x y) |
(Semigroup x, Semigroup y, Semigroup z) => Biapply ((,,,,) x y z) |

(<<$>>) :: (a -> b) -> a -> bSource

(<<..>>) :: Biapply p => p a c -> p (a -> b) (c -> d) -> p b dSource

bilift2 :: Biapply w => (a -> b -> c) -> (d -> e -> f) -> w a d -> w b e -> w c fSource

Lift binary functions

bilift3 :: Biapply w => (a -> b -> c -> d) -> (e -> f -> g -> h) -> w a e -> w b f -> w c g -> w d hSource

Lift ternary functions

module Data.Bifunctor