News for hackers. Stuff that matters.
Re:OCaml 4.03: Everything else by massysett on Wednesday March 02, 2016 @09:47AM (#11210190)
"monads they usually only include `bind` and `return`"

All you need for a monad is `bind` and `return`. Is the problem that there are not polymorphic monad combinators like `sequence`, `traverse`, etc.?

Re:OCaml 4.03: Everything else by GreaterFool on Wednesday March 02, 2016 @10:34AM (#11210535)
Yes, there are a lot of operations that can be implemented just in terms of bind and return. It is possible to make some functions more efficient by implementing them directly but having a generic library to fall back to would help with consistency. For instance both `lwt` and `async` are monadic, but `async` provides a richer API. I think having a generic monad library would help to bridge the gap a little bit*

* Since I am only dabbling in OCaml and only use `lwt` and `async` occasionally I'm not entirely sure. But judging by the usual structure of Haskell libraries, it should help

Re:OCaml 4.03: Everything else by lmm on Wednesday March 02, 2016 @11:51AM (#11211121)
Yes. You can implement sequence/traverse/etc. for each specific monad in OCaml, but if you want to write a generic implementation that will work for any monad then you need typeclass-like functionality.
Re:OCaml 4.03: Everything else by nv-vn on Wednesday March 02, 2016 @01:14PM (#11211776)
Not necessarily. You can manually pass in the module for the monad using first-class modules and then define the functions in terms of that. You could also define those operations in terms of monads using a functor if you want it to look more like Haskell.