package containers

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

Parameters

Signature

type elt = X.t

Elements that are to be counted

type t
val create : int -> t

A counter maps elements to natural numbers (the number of times this element occurred)

val incr : t -> elt -> unit

Increment the counter for the given element

val incr_by : t -> int -> elt -> unit

Add several occurrences at once

val get : t -> elt -> int

Number of occurrences for this element

val add_seq : t -> elt sequence -> unit

Increment each element of the sequence

val of_seq : elt sequence -> t

of_seq s is the same as add_seq (create ())

OCaml

Innovation. Community. Security.