3 ms·
SML has always let you abstract over type-constructors using modules, and it was always routine to do so. You can express monads abstractly in this way, and som
by momentoftop 6y ago
SML has always let you abstract over type-constructors using modules, and it was always routine to do so. You can express monads abstractly in this way, and some people have (Ocaml, but the SML is the same modulo syntax):
http://batteries.forge.ocamlcore.org/doc.preview:batteries-beta1/html/api/Monad.S.html http://batteries.forge.ocamlcore.org/doc.preview:batteries-b...
But the sort of code you would write in Haskell gets very noisy without typeclasses, and it's just not an obviously good way to program in a language that's intended to be impure and strict.