ocaml.org icon indicating copy to clipboard operation
ocaml.org copied to clipboard

update option.md with small tweaks and additional examples

Open jakubsvec001 opened this issue 8 months ago • 1 comments

This is 1 of 2 pull requests on the option.md tutorial.

I broke these into two parts. I don't intend for part 2's suggestions to be pulled into the repo since they are currently in a separate file for your consideration. There is probably a better way for me to structure such a pair of pull requests such that they can be considered separately and am open to suggestions for the future. My priority was to keep them from stepping on each other during a potential merge.

Part 1: Part one has some minor tweaks and additional examples. This includes an updated "## Conclusion" to be more encompassing of the lesson as a whole. The deleted "## Conclusion" is included in part 2.

Part 2: Part two is an extrapolation on the Option.bind implementation example using Option.map and Option.join. I found this example fun to consider but thought it warranted a longer treatment since it is not immediately clear how Option.map and Option.join chain together. Part 2 can be found here: https://github.com/ocaml/ocaml.org/pull/2987

jakubsvec001 avatar Feb 26 '25 17:02 jakubsvec001