cs3110 / textbook

The CS 3110 Textbook, "OCaml Programming: Correct + Efficient + Beautiful"
Other
740 stars 134 forks source link

Issue on page /chapters/data/assoc_list.html #74

Closed curtisxk38 closed 2 years ago

curtisxk38 commented 2 years ago

in this snippet:

(** [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

thanks for the book