
3 Sep
2007
3 Sep
'07
7:28 p.m.
On Mon, 3 Sep 2007, Peter Verswyvelen wrote:
Okay. Now the following might not make sense at all, but... isn't the abstract concept of a list just a sequence of elements (okay, with a whole lot of extra properties)? So couldn't we write: do { 1;2;3;4 } instead of [1,2,3,4] somehow for some special "list builder" monad? And then do {1;2;3;4 } could be lifted to any kind of structure when you run it through a different builder. Ah, I guess not... I'm not familiar enough with monads.
Why not just FancySequence.fromList [1,2,3,4] or FancySequence.fromList $ 1:2:3:4:[] ?