News for hackers. Stuff that matters.
Re:Exotic List Monads by lmm on Thursday January 07, 2021 @09:14PM (#25680613)
> In each case return is singleton (it is not known if there exists a monad on lists with a different return).

The "diagonal" monad join [[a, b, c, ...], [1, 2, 3, ...], [x, y, z, ...], ...] = [a, 2, z, ...] has return a = [a, a, a, ...], though I guess it's hard to define it in a way that's well-behaved for finite lists, so you might not consider it "a monad on lists".

Re:Exotic List Monads by 082349872349872 on Friday January 08, 2021 @12:47AM (#25681901)
for finite lists, why not just have it return in k-diagonal order? (sort of like Hope's "diagonal comprehension" but with wraparound repetition)