invertible-0.1.2: bidirectional arrows, bijective functions, and invariant functors

Safe HaskellSafe
LanguageHaskell2010

Data.Invertible.Tuple

Description

Bidirectional version of Data.Tuple and other operations over nested tuples.

Synopsis

Documentation

fst :: (a, ()) <-> a Source #

Extract the fst component of a pair.

snd :: ((), a) <-> a Source #

Extract the snd component of a pair.

curry :: ((a, b) -> c) <-> (a -> b -> c) Source #

Convert between an uncurried function and a curryed function.

swap :: (a, b) <-> (b, a) Source #

swap the components of a pair.

flatten1_2 :: (a, (b, c)) <-> (a, b, c) Source #

flatten1_3 :: (a, (b, c, d)) <-> (a, b, c, d) Source #

flatten1_4 :: (a, (b, c, d, e)) <-> (a, b, c, d, e) Source #

flatten2_1 :: ((a, b), c) <-> (a, b, c) Source #

flatten2_2 :: ((a, b), (c, d)) <-> (a, b, c, d) Source #

flatten3_1 :: ((a, b, c), d) <-> (a, b, c, d) Source #

flatten4_1 :: ((a, b, c, d), e) <-> (a, b, c, d, e) Source #