3 ms·
>in Koka, effects are inferred Monadic types can be inferred most of the time in Haskell, it's just considered good practice to include a type signature for ev
by aninhumer 12y ago
>in Koka, effects are inferred
Monadic types can be inferred most of the time in Haskell, it's just considered good practice to include a type signature for every function.
>Koka also allows you to mix effects, e.g. a function can be `<io, st<h>, ndet>`
This can be done with Monad transformers, although it's a little awkward at the moment. There are various proposals for better composition here, and I suspect sooner or later someone will work out a good solution.
>`map` can be polymorphic in the effect of the mapping function.
`mapM` is polymorphic over monadic functions. `map` doesn't handle monadic functions (unless you just want a list of monadic values), but since they're kind of different operations, I think it's preferable to have different functions for each.