I don't think we
considered the possibility you might use do notation for the list
monad, as it's not an idiom that seems to occur often.

depends where you look, I guess. (Such questions could in principle
be answered automatically by browsing the code on hackage?)

As I said, I am avoiding list comprehensions for purely optical reasons
(putting the cart before the horse), so I write "do" in the list monad.

Of course I prefer "let" to "where" for the same reasons,
so for me you could indeed replace "guard" by "where",
and "return" by "select", and "x <- foo" by "from x in foo"
and it'd look like the real (linq) thing. - Oh, and replace
"Monad" by "Workflow". - Not!

NB: Wasn't there a time (before "do") when "list" notation (brackets)
would work in any monad? And "map" was a method in "Functor",
and we had "class Functor m => Monad m", etc. Well well well times have changed.


Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to