Header menu logo fantomas

ListAssoc Module

Functions and values

Function or value Description

find f x l

Full Usage: find f x l

Parameters:
    f : 'a -> 'b -> bool
    x : 'a
    l : ('b * 'c) list

Returns: 'c

Treat a list of key-value pairs as a lookup collection. This function looks up a value based on a match from the supplied predicate function.

f : 'a -> 'b -> bool
x : 'a
l : ('b * 'c) list
Returns: 'c

tryFind f x l

Full Usage: tryFind f x l

Parameters:
    f : 'key -> 'key -> bool
    x : 'key
    l : ('key * 'value) list

Returns: 'value option

Treat a list of key-value pairs as a lookup collection. This function looks up a value based on a match from the supplied predicate function and returns None if value does not exist.

f : 'key -> 'key -> bool
x : 'key
l : ('key * 'value) list
Returns: 'value option

Type something to start searching.