package travesty

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

Extend2 implements Extensions2 for an arity-2 bi-mappable container.

Parameters

module S : S2

Signature

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

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

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

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

To fix both types, use T.Fix_left(Left).Fix_right(right).

module Fix_left (Left : Base.T) : S1_right_with_extensions with type 'r t := (Left.t, 'r) S.t and type left := Left.t

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

module Fix_right (Right : Base.T) : S1_left_with_extensions with type 'l t := ('l, Right.t) S.t and type right := Right.t

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

OCaml

Innovation. Community. Security.