package spotlib

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

Module Weaktbl.BucketSource

Sourcetype ('a, 'b) t
Sourceval create : int -> ('a, 'b) t
Sourceval add : ('a, 'b) t -> 'a -> 'b -> unit
Sourceval find : ('a, 'b) t -> ('a -> 'b -> bool) -> ('a * 'b) option

find t f: the first (k,v) pair f k v = true, if exists, is returned as Some (k,v). If none found, returns None

Sourceval remove : ('a, 'b) t -> ('a -> 'b -> bool) -> ('a * 'b) option

remove t f: the first (k,v) pair f k v = true, if exists, is removed from t and returns the Some (k,v). If none found, returns None.

Sourceval removeq : ('a, 'b) t -> 'a -> 'b option

removeq t k removes the binding of the pointer equal k from t and returns its value if exists. Otherwise it returns None.

Sourceval length : ('a, 'b) t -> int

return the number of full elements