package preface

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ('a, 'b) t = ('a, 'b) Core.t

The type held by the Arrow.

val compose_right_to_left : ('b, 'c) t -> ('a, 'b) t -> ('a, 'c) t

An alias of CORE.compose.

val compose_left_to_right : ('a, 'b) t -> ('b, 'c) t -> ('a, 'c) t

An alias of CORE.compose with flipped argument.

val return : unit -> ('a, 'a) t

Represent the identity Arrow.

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

Send the second component of the input through the given Arrow, and copy the rest unchanged to the output.

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

Send the input to both argument arrows and combine their output.

val pre_compose_left_to_right : ('a -> 'b) -> ('b, 'c) t -> ('a, 'c) t

Pre composition with a function (the function should be pure).

val post_compose_left_to_right : ('a, 'b) t -> ('b -> 'c) -> ('a, 'c) t

Post composition with a function (the function should be pure).

val pre_compose_right_to_left : ('b, 'c) t -> ('a -> 'b) -> ('a, 'c) t
val post_compose_right_to_left : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t
val right : ('a, 'b) t -> (('c, 'a) Preface_core.Shims.Either.t, ('c, 'b) Preface_core.Shims.Either.t) t

The mirror image of left.

val fan_in : ('a, 'c) t -> ('b, 'c) t -> (('a, 'b) Preface_core.Shims.Either.t, 'c) t

Split the input between the two argument arrows and merge their outputs.

OCaml

Innovation. Community. Security.