Diagonalization/ dupe for monads and tuples?

Matthew Farkas-Dyck strake888 at gmail.com
Wed Sep 16 19:39:46 UTC 2020

We also have

diag = join bipure

and (in pseudo-Haskell)

diag = unJoin . pure
    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

More information about the Libraries mailing list