Is join useful for every monad?

Dmitrii Kovanikov kovanikov at gmail.com
Mon Oct 14 05:41:59 UTC 2019


Data types like `IO (IO a)` are useful and their usage is described in the
following blog post:

* http://www.haskellforall.com/2018/02/the-wizard-monoid.html

One function from the example uses `join` directly:

runWizard :: IO (IO a) -> IO a
runWizard = join

On Mon, Oct 14, 2019 at 7:55 AM Dannyu NDos <ndospark320 at gmail.com> wrote:

> join is surely useful for Maybe and [].
>
> But IO (IO a)? ReadPrec (ReadPrec a)? ST s (ST s a)? When the heck could I
> encounter such types?
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20191014/4eff99de/attachment.html>


More information about the Libraries mailing list