For.A
val neutral : ('a, 'b) t
The neutral element of the Arrow_zero
.
include Preface_specs.Category.WITH_ID with type ('a, 'b) t := ('a, 'b) t
val id : ('a, 'a) t
The identity morphism.
Send the first component of the input through the argument Arrow
, and copy the rest unchanged to the output.
val arrow : ('a -> 'b) -> ('a, 'b) t
Lift a function to an Arrow
.
Split the input between the two given Arrows
and combine their output.
An alias of CORE
.compose with flipped argument.
val return : unit -> ('a, 'a) t
Represent the identity Arrow
.
Send the second component of the input through the given Arrow
, and copy the rest unchanged to the output.
Send the input to both argument arrows and combine their output.
Pre composition with a function (the function should be pure).
Post composition with a function (the function should be pure).
Reversed version of Preface_specs.Arrow.OPERATION.pre_compose_left_to_right
.
Reversed version of Preface_specs.Arrow.OPERATION.post_compose_left_to_right
.
times n x
apply combine
on x
n
times. If n
is lower than 1
the function will returns None
.
val reduce_nel : ('a, 'b) t Preface_core.Nonempty_list.t -> ('a, 'b) t
Reduce a Nonempty_list.t
using combine
.
times_nel n x
apply combine
on x
n
times. If n
is lower than 1
the function will returns neutral
.
module Infix :
Preface_specs.Arrow_plus.INFIX with type ('a, 'b) t := ('a, 'b) t
An alias of CORE
.compose (to be iso with Preface_core
).
An alias of CORE
.compose (to be iso with Preface_core
).
An alias of OPERATION
.compose_left_to_right (to be iso with Preface_core
).
An alias of CORE
.compose (to be iso with Haskell's approach). Even <<<
looks like <%
(it is an alias for the same function), they differ in their priorities. OCaml documentation of operators priorities
An alias of CORE
.compose_left_to_right (to be iso with Haskell's approach). Even >>>
looks like %>
(it is an alias for the same function), they differ in their priorities. OCaml documentation of operators priorities
Infix version of Preface_specs.Arrow.CORE.split
.
Infix version of Preface_specs.Arrow.OPERATION.fan_out
.
Infix version of Preface_specs.Arrow.OPERATION.pre_compose_left_to_right
.
Infix version of Preface_specs.Arrow.OPERATION.post_compose_left_to_right
.
Infix version of Preface_specs.Arrow.OPERATION.post_compose_right_to_left
.
Infix version of Preface_specs.Arrow.OPERATION.post_compose_right_to_left
.