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.

Henning Thielemann wrote:
On Sun, 2 Sep 2007, Lennart Augustsson wrote:

You're right.  The list syntax is only for lists in Haskell.  It would be
nice if the list syntax was overloaded too.

The special list syntax isn't as good, as always proposed. I have
collected some advantages of the bare infix notation:
 http://www.haskell.org/haskellwiki/List_notation



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to