3 ms·
I meant Haskell's do-notation sugar - it only works for monads (or applicatives, assuming ApplicativeDo and absence of dependencies on intermediate results). OC
by TheAsprngHacker 7y ago
I meant Haskell's do-notation sugar - it only works for monads (or applicatives, assuming ApplicativeDo and absence of dependencies on intermediate results). OCaml's new "binding operators" let you define your own variations of `let` and `and`, which resemble do-notation and therefore have the same cognitive convenience. Then, you can define `let` for functors, etc. You can basically have `let` sugar for any operation that takes a function as the second argument.