Module Arrow.Core_over_category_and_via_arrow_and_split

Parameters

module Req : Preface_specs.Arrow.WITH_ARROW_AND_SPLIT with type ('a, 'b) t = ('a, 'b) Category.t

Signature

type ('a, 'b) t = ('a, 'b) Req.t

The type held by the Arrow.

include Preface_specs.Category.WITH_ID with type ('a, 'b) t := ('a, 'b) t
val id : ('a, 'a) t

The identity morphism.

include Preface_specs.Semigroupoid.WITH_COMPOSE with type ('a, 'b) t := ('a, 'b) t
val compose : ('b, 'c) t -> ('a, 'b) t -> ('a, 'c) t

Morphism composition (from right to left).

val fst : ('a, 'b) t -> ('a * 'd, 'b * 'd) t

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.

val split : ('a, 'b) t -> ('c, 'd) t -> ('a * 'c, 'b * 'd) t

Split the input between the two given Arrows and combine their output.