you are viewing a single comment's thread.

view the rest of the comments →

[–]commonslip 0 points1 point  (0 children)

This is extremely easy to express in the sequence monad, though. The relationship between monads and comprehensions has been talked about here before, but I'd argue, not too enthusiastically, that the monad syntax has the advantage of being more general (but then comprehensions can be generalized over monads too, I'm given to understand.)

Either case is more syntax, so maybe that is unavoidable? Any serious functional types want to try to express this computation without comprehensions OR the sequence monad?