Diagonalization/ dupe for monads and tuples?
Carter Schonwald
carter.schonwald at gmail.com
Wed Sep 16 19:49:15 UTC 2020
Is the join bipure definition taking advantage of the (a->) monad
instance? Slick!
On Wed, Sep 16, 2020 at 3:39 PM Matthew Farkas-Dyck <strake888 at gmail.com>
wrote:
> We also have
>
>
>
> diag = join bipure
>
>
>
> and (in pseudo-Haskell)
>
>
>
> diag = unJoin . pure
>
> where
>
> newtype Join f a = Join { unJoin :: f a a } deriving (Functor)
>
> deriving instance Biapplicative f => Applicative (Join f)
>
>
>
> The latter seems on its face potentially related to the instance for
>
> lists of fixed length, but i am not sure how deep the connection may
>
> be.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20200916/90712b6d/attachment.html>
More information about the Libraries
mailing list