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.
[ Parent
| on HN ]
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.