reasonml.github.io icon indicating copy to clipboard operation
reasonml.github.io copied to clipboard

List.find_opt missing from docs

Open aaronshaf opened this issue 8 years ago • 3 comments

"For example, List.find has the option-returning counterpart List.find_opt, which doesn't throw." (https://reasonml.github.io/guide/language/exception)

yet List.find_opt is missing from

https://bucklescript.github.io/bucklescript/api/Js.List.html

and

https://reasonml.github.io/api/List.html

aaronshaf avatar Dec 14 '17 18:12 aaronshaf

List.find_opt was added in OCaml version4.05 (source). As far as I'm aware, BuckleScript only support OCaml version 4.02.3.

That means that List.find_opt probably isn't available yet in Reason

samouri avatar Jun 01 '18 06:06 samouri

Shouldn't it be removed from the docs then?

arnauorriols avatar Jun 26 '18 22:06 arnauorriols

I think the new recommended way is to use Belt.List which uses options no?

Anahkiasen avatar Jun 27 '18 10:06 Anahkiasen