package travesty

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

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

Parameters

module Left : Base.T

Signature

include Bi_mappable.S1_right with type 'r t := (Left.t, 'r) t with type left := Left.t
include Types_intf.Bi_right with type 'r t := (Left.t, 'r) t with type left := Left.t
include Bi_mappable.Generic with type ('l, 'r) t := (Left.t, 'r) t and type 'l left := Left.t and type 'r right := 'r
include Types_intf.Bi_generic with type ('l, 'r) t := (Left.t, 'r) t with type 'l left := Left.t with type 'r right := 'r
val bi_map : (Left.t, 'r1) t -> left:(Left.t -> Left.t) -> right:('r1 -> 'r2) -> (Left.t, 'r2) t

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

include Bi_mappable.Extensions1_right with type 'r t := (Left.t, 'r) t and type left := Left.t
include Types_intf.Bi_right with type 'r t := (Left.t, 'r) t with type left := Left.t
include Bi_mappable.Generic_extensions with type ('l, 'r) t := (Left.t, 'r) t and type 'l left := Left.t and type 'r right := 'r
include Types_intf.Bi_generic with type ('l, 'r) t := (Left.t, 'r) t with type 'l left := Left.t with type 'r right := 'r
val map_left : (Left.t, 'r) t -> f:(Left.t -> Left.t) -> (Left.t, 'r) t

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

val map_right : (Left.t, 'r1) t -> f:('r1 -> 'r2) -> (Left.t, 'r2) t

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

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

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

include Mappable.S1 with type 'r t := (Left.t, 'r) t
include Mappable.Generic with type 'a t := (Left.t, 'a) 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 := (Left.t, 'a) t with type 'a elt := 'a
val map : (Left.t, 'a) t -> f:('a -> 'b) -> (Left.t, 'b) t

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

OCaml

Innovation. Community. Security.