package travesty

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

S0_container is the signature of an arity-0 mappable container.

include S0
include Types_intf.S0
type t

The container type.

type elt

The element type.

include Generic with type 'a t := t and type 'a elt := elt

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 := t with type 'a elt := elt
val map : t -> f:(elt -> elt) -> t

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

include Base.Container.S0 with type t := t and type elt := elt
val mem : t -> elt -> bool
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(elt -> unit) -> unit
val fold : t -> init:'accum -> f:('accum -> elt -> 'accum) -> 'accum
val fold_result : t -> init:'accum -> f:('accum -> elt -> ('accum, 'e) Base__.Result.t) -> ('accum, 'e) Base__.Result.t
val fold_until : t -> init:'accum -> f:('accum -> elt -> ('accum, 'final) Base__Container_intf.Continue_or_stop.t) -> finish:('accum -> 'final) -> 'final
val exists : t -> f:(elt -> bool) -> bool
val for_all : t -> f:(elt -> bool) -> bool
val count : t -> f:(elt -> bool) -> int
val sum : (module Base__Container_intf.Summable with type t = 'sum) -> t -> f:(elt -> 'sum) -> 'sum
val find : t -> f:(elt -> bool) -> elt option
val find_map : t -> f:(elt -> 'a option) -> 'a option
val to_list : t -> elt list
val to_array : t -> elt array
val min_elt : t -> compare:(elt -> elt -> int) -> elt option
val max_elt : t -> compare:(elt -> elt -> int) -> elt option
OCaml

Innovation. Community. Security.