loading...

re: Optional chaining in Reason VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Nice writeup! If I were to nitpick, I’d add that: Jane Street Base uses >>| for map, so maybe it’s slightly more idiomatic in OCaml/Reason ...
 

Good points. As far as >>= goes, I picked it as my example because it’s used by bs-abstract and Relude (which uses bs-abstract). github.com/Risto-Stevcev/bs-abstra...

Although, if you bind them to Belt’s functions, this may still feel “wrong” to people used to data-last infixes. There are tradeoffs no matter what infix you choose.

 

I’ve also heard (actually, read) Cheng Lou say they’d like to avoid infix operators in general, so probably monadic let is the way to go.

code of conduct - report abuse