Add instance Monad ZipList
Henning Thielemann
lemming at henning-thielemann.de
Thu Jun 4 23:52:33 UTC 2020
On Thu, 4 Jun 2020, Carter Schonwald wrote:
> *i believe* the way to write the monad instance would be to implement a join :: SizedLIst n (SizedList n a) ->
> SizedList n a
> that picks the diagonal. But i could be wrong? it wasn't a priority for me at the time, but would that "diagonal"
> / trace be the right way to induce a bind?
Sure, that's analogous to instance Monad ((->) a).
More information about the Libraries
mailing list