You can use the (-> c) instance in fun ways

both :: (a -> b) -> (a, a) -> (b, b)
both = join (***)

dup :: a -> (a, a)
dup = join (,)

between `join` (char '"')

On 10/13/19 11:55 PM, Dannyu NDos 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@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries