invertible-0.2.0.8: bidirectional arrows, bijective functions, and invariant functors
Safe HaskellSafe
LanguageHaskell2010

Data.Invertible.Function

Description

Bidirectional version of Data.Function.

Synopsis

Documentation

id :: a <-> a Source #

Identity bijection.

(.) :: (b <-> c) -> (a <-> b) -> a <-> c infixr 9 Source #

Bijection composition

consts :: a -> b -> a <-> b Source #

Bidirectional constant function (not a true bijection).

const :: a -> () <-> a Source #

Convert between () and a constant (not a true bijection).

flip :: (a -> b -> c) <-> (b -> a -> c) Source #

flip the order of the first two arguments of a function.