| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Agda.Utils.Tuple
Synopsis
- (//) :: a -> b -> (a, b)
- (***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c')
- (&&&) :: Arrow a => a b c -> a b c' -> a b (c, c')
- first :: Bifunctor p => (a -> b) -> p a c -> p b c
- second :: Bifunctor p => (b -> c) -> p a b -> p a c
- sortPair :: Ord a => (a, a) -> (a, a)
- fst3 :: (a, b, c) -> a
- snd3 :: (a, b, c) -> b
- thd3 :: (a, b, c) -> c
- swap :: (a, b) -> (b, a)
- uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
- uncurry4 :: (a -> b -> c -> d -> e) -> (a, b, c, d) -> e
- mapPairM :: Applicative m => (a -> m c) -> (b -> m d) -> (a, b) -> m (c, d)
- firstM :: Functor m => (a -> m c) -> (a, b) -> m (c, b)
- secondM :: Functor m => (b -> m d) -> (a, b) -> m (a, d)
- data Pair a = Pair a a
Documentation
(***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c') infixr 3 #
Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.
The default definition may be overridden with a more efficient version if desired.
b ╭─────╮ b' >───┼─ f ─┼───> >───┼─ g ─┼───> c ╰─────╯ c'
(&&&) :: Arrow a => a b c -> a b c' -> a b (c, c') infixr 3 #
Fanout: send the input to both argument arrows and combine their output.
The default definition may be overridden with a more efficient version if desired.
╭───────╮ c
b │ ┌─ f ─┼───>
>───┼─┤ │
│ └─ g ─┼───>
╰───────╯ c'mapPairM :: Applicative m => (a -> m c) -> (b -> m d) -> (a, b) -> m (c, d) Source #
Monadic version of ***.
Constructors
| Pair a a |