-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A library for postfix control flow.
--
-- Concatenative gives haskell factor style combinators and arrows for
-- postfix notation. For more information on stack based languages, see
-- http://concatenative.org
@package concatenative
@version 0.0.0
-- | Control.Concatenative brings postfix notation in the style of factor
-- (see http:factorcode.org) to haskell. Interfaces using both
-- combinators and arrows are available.
module Control.Concatenative
-- | Apply both arguments to a and combine the results
bi :: (a -> b) -> (a -> c) -> (b -> c -> d) -> a -> d
-- | Apply each of three arguments to a and combine the results
tri :: (a -> b) -> (a -> c) -> (a -> d) -> (b -> c -> d -> e) -> a -> e
-- | Apply the first argument to a, the second to b, and combine the
-- results
biSp :: (a -> c) -> (b -> d) -> (c -> d -> e) -> a -> b -> e
-- | Apply the first argument to a, the second to b, and the third to c,
-- combining the results
triSp :: (a -> d) -> (b -> e) -> (c -> f) -> (d -> e -> f -> g) -> a -> b -> c -> g
-- | Apply a function to two values and combine the results
biAp :: (t -> t1) -> (t1 -> t1 -> t2) -> t -> t -> t2
-- | Apply a function to three values and combine the results
triAp :: (a -> b) -> (b -> b -> b -> c) -> a -> a -> a -> c
ifte :: (a -> Bool) -> (a -> b) -> (a -> b) -> a -> b
-- | Combine with a binary function
(>>@) :: (Arrow a) => a b (x, y) -> (x -> y -> z) -> a b z
dup :: (Arrow a) => a b (b, b)
swap :: (Arrow a) => a (x, y) (y, x)
-- | Arrow version of biAp
both :: (Arrow a) => a b c -> a (b, b) (c, c)
-- | Left-to-right composition
(>>>) :: (Category cat) => cat a b -> cat b c -> cat a c
-- | 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.
(&&&) :: (Arrow a) => forall b c c'. a b c -> a b c' -> a b (c, c')
-- | 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.
(***) :: (Arrow a) => forall b c b' c'. a b c -> a b' c' -> a (b, b') (c, c')
-- | Send the first component of the input through the argument arrow, and
-- copy the rest unchanged to the output.
first :: (Arrow a) => forall b c d. a b c -> a (b, d) (c, d)
-- | A mirror image of first.
--
-- The default definition may be overridden with a more efficient version
-- if desired.
second :: (Arrow a) => forall b c d. a b c -> a (d, b) (d, c)