package travesty

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

Extend1_right implements Extensions1_right for an arity-1 bi-mappable container with floating right type.

Parameters

module S : S1_right

Signature

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

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

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

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

module Fix_right (Right : Base.T) : S0_with_extensions with type t := Right.t S.t and type right := Right.t

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

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

OCaml

Innovation. Community. Security.