package travesty

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Fixes the right type of this container to Right.t.

Parameters

module Right : Base.T

Signature

include Bi_mappable.S1_left with type 'l t := ('l, Right.t) t with type right := Right.t
include Types_intf.Bi_left with type 'l t := ('l, Right.t) t with type right := Right.t
include Bi_mappable.Generic with type ('l, 'r) t := ('l, Right.t) t and type 'l left := 'l and type 'r right := Right.t
include Types_intf.Bi_generic with type ('l, 'r) t := ('l, Right.t) t with type 'l left := 'l with type 'r right := Right.t
val bi_map : ('l1, Right.t) t -> left:('l1 -> 'l2) -> right:(Right.t -> Right.t) -> ('l2, Right.t) t

bi_map c ~left ~right maps left over every 'l1 left, and right over every 'r1 right, in c.

include Bi_mappable.Extensions1_left with type 'l t := ('l, Right.t) t and type right := Right.t
include Types_intf.Bi_left with type 'l t := ('l, Right.t) t with type right := Right.t
include Bi_mappable.Generic_extensions with type ('l, 'r) t := ('l, Right.t) t and type 'l left := 'l and type 'r right := Right.t
include Types_intf.Bi_generic with type ('l, 'r) t := ('l, Right.t) t with type 'l left := 'l with type 'r right := Right.t
val map_left : ('l1, Right.t) t -> f:('l1 -> 'l2) -> ('l2, Right.t) t

map_left c ~f maps f over the left type of c only.

val map_right : ('l, Right.t) t -> f:(Right.t -> Right.t) -> ('l, Right.t) t

map_right c ~f maps f over the right type of c only.

module Fix_left (Left : Base.T) : Bi_mappable.S0_with_extensions with type t := (Left.t, Right.t) t and type left := Left.t

Fixes the left type of this container to Left.t.

Bi-mappable types with a fixed right type are mappable over their left.

include Mappable.S1 with type 'l t := ('l, Right.t) t
include Mappable.Generic with type 'a t := ('a, Right.t) t and type 'a elt := 'a

Generic refers to the container type as 'a t, and the element type as 'a elt; substitute t/elt (arity-0) or 'a t/'a (arity-1) accordingly below.

include Types_intf.Generic with type 'a t := ('a, Right.t) t with type 'a elt := 'a
val map : ('a, Right.t) t -> f:('a -> 'b) -> ('b, Right.t) t

map c ~f maps f over every t in c.

OCaml

Innovation. Community. Security.