assoc -> assoc_opt

master
John Whitington 2020-09-11 20:07:44 +01:00
parent cd920ab553
commit 2d217e7c44
2 changed files with 2 additions and 2 deletions

View File

@ -388,7 +388,7 @@ val assoc : 'a -> ('a * 'b) list -> 'b
val assoc_opt : 'a -> ('a * 'b) list -> 'b option
(** [assoc_opt a l] returns the value associated with key [a] in the list of
pairs [l]. That is,
[assoc a [ ...; (a,b); ...] = Some b]
[assoc_opt a [ ...; (a,b); ...] = Some b]
if [(a,b)] is the leftmost binding of [a] in list [l].
Returns [None] if there is no value associated with [a] in the
list [l].

View File

@ -388,7 +388,7 @@ val assoc : 'a -> ('a * 'b) list -> 'b
val assoc_opt : 'a -> ('a * 'b) list -> 'b option
(** [assoc_opt a l] returns the value associated with key [a] in the list of
pairs [l]. That is,
[assoc a [ ...; (a,b); ...] = Some b]
[assoc_opt a [ ...; (a,b); ...] = Some b]
if [(a,b)] is the leftmost binding of [a] in list [l].
Returns [None] if there is no value associated with [a] in the
list [l].