o1-labs / ocamlbyexample

Learn Ocaml by reading code examples
https://o1-labs.github.io/ocamlbyexample/
69 stars 4 forks source link

Errors on the map page #1

Closed roddyyaga closed 3 years ago

roddyyaga commented 3 years ago

Hey, I spotted a few mistakes on the page about maps (https://o1-labs.github.io/ocamlbyexample/basics-map.html)

Also, in the example code let balances = Map.empty (module String) I think it would be more idiomatic to do let balances = String.Map.empty. Many modules like String in Core have a specialised map submodule like this.

mimoo commented 3 years ago

Hey! Sorry for the slow reply, and thanks for pointing these out. Would you be interested in submitting a PR to provide these changes?