(** [find k lst] is [Some v] if association list [lst] binds key [k] to
value [v]; and is [None] if [lst] does not bind [k]. *)
let rec lookup k = function
| [] -> None
| (k', v) :: t -> if k = k' then Some v else lookup k t
it looks like the documentation is for a function called find, but the actual function is called lookup
in this snippet:
it looks like the documentation is for a function called
find
, but the actual function is calledlookup
thanks for the book