Preface_specs.Arrow
An Arrow
is an abstract view of computation sitting between Applicative
and Monad
. Arrow
is built on the top of Category
and Strong
. So an Arrow
is also a Category
.
To have a predictable behaviour, the instance of Arrow
must obey some laws.
Category
lawsarrow id = id
arrow (g % f) = arrow f >>> arrow g
fst (arrow f) = arr (fst f)
fst (f >>> g) = fst f >>> fst g
fst f >>> arrow (fun (x,y) -> (x,g y)) = arrow (fun (x,y) -> (x,g y)) >>> fst f
fst f >>> arrow Stdlib.fst = arrow Stdlib.fst >>> f
fst (fst f) >>> arrow assoc = arrow assoc >>> fst f
module type WITH_ARROW = sig ... end
Exposes the arrow
function, mandatory for each requirement.
module type WITH_ARROW_AND_FST = sig ... end
Minimal definition using fst
.
module type WITH_ARROW_AND_SPLIT = sig ... end
Minimal definition using split
.
module type CORE = sig ... end
Basis operations.
module type OPERATION = sig ... end
Additional operations.
module type ALIAS = sig ... end
Aliases of some operations functions.
module type INFIX = sig ... end
Infix operators.
module type API = sig ... end
The complete interface of an Arrow
.