<div dir="auto">Is the join bipure definition taking advantage of the (a->) monad instance?  Slick!</div><div dir="auto"><br></div><div dir="auto"><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 16, 2020 at 3:39 PM Matthew Farkas-Dyck <<a href="mailto:strake888@gmail.com">strake888@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We also have<br><br><br><br>diag = join bipure<br><br><br><br>and (in pseudo-Haskell)<br><br><br><br>diag = unJoin . pure<br><br>  where<br><br>    newtype Join f a = Join { unJoin :: f a a } deriving (Functor)<br><br>    deriving instance Biapplicative f => Applicative (Join f)<br><br><br><br>The latter seems on its face potentially related to the instance for<br><br>lists of fixed length, but i am not sure how deep the connection may<br><br>be.<br><br></blockquote></div></div>