Module CCListLabels.Assoc
val get : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> 'b option
Find the element.
val get_exn : eq:('a -> 'a -> bool) -> 'a -> ('a, 'b) t -> 'b
Like
get
, but unsafe.- raises Not_found
if the element is not present.
val set : eq:('a -> 'a -> bool) -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t
Add the binding into the list (erase it if already present).
val mem : eq:('a -> 'a -> bool) -> 'a -> ('a, _) t -> bool
mem x l
returnstrue
iffx
is a key inl
.- since
- 0.16