assoc


assoc(x, xys)
      

Return the first element from the association list xys whose head is equivalent to x. Return false if the element is not found.

An association list is a proper list whose elements are pairs of the form key:value.

The equivalence test for assoc is is_equal.

Examples:


assoc("b", ["a":1, "b":2, "c":3])
// b:2
      

Also see:

assq
assv
get


Core Module Index | Contents