Module type Mappable_types.S0_container

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

include S0
include Generic_types.S0
type t

The container type.

type elt

The element type.

include Generic with type ('a, 'phantom) 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 Generic_types.Generic with type ('a, 'phantom) 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:'acc -> f:('acc -> elt -> 'acc) -> 'acc
val fold_result : t -> init:'acc -> f:('acc -> elt -> ('acc, 'e) Base__.Result.t) -> ('acc, 'e) Base__.Result.t
val fold_until : t -> init:'acc -> f:('acc -> elt -> ('acc, 'final) Base__Container_intf.Continue_or_stop.t) -> finish:('acc -> '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