
You can find it all in
https://hackage.haskell.org/package/adjunctions-4.4/docs/Data-Functor-Rep.ht...
Length-indexed vectors are representable functors and thus can be treated
essentially as functions, winning loads of instances for free. Whether
those are the instances you want is another question, but they're valid.
On Thu, Jun 4, 2020, 8:12 PM Carter Schonwald
david, henning, could you expand on that intuition? i'm a bit derped up from nyc being crazy stresses and doing my best to not engaged unconstructively on interpersonal frustractionsl on the internet, and i"m sure the exposition would benefit other please :)
-Carter
On Thu, Jun 4, 2020 at 7:52 PM Henning Thielemann < lemming@henning-thielemann.de> wrote:
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).
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries