Open worldmaker18349276 opened 1 month ago
by the way,
fix-sized array is Bind: https://github.com/sigma-andex/purescript-fast-vect/blob/209c35d9b616370dc2bb7efaa4c1d2ac4fd394bf/src/Data/FastVect/FastVect.purs#L75
ZipArray (finite nonempty array using zip longest strategy) is Bind: https://gist.github.com/ajnsit/b2aebc5f70d1192122bde7bf5f18592a#file-ziparray-purs-L100
https://github.com/purescript/purescript-lists/blob/b113451e5b41cad87d669a3165f955c71cd863e2/src/Data/List/ZipList.purs#L57-L66
ZipList is Bind, in which join is just diagonal. It's also Monad and MonadPlus.
Example: https://try.purescript.org/?gist=4888527a78d71d12df75fa628acd4719