Introduction, comprehensions beyond arrays

Brendan Eich brendan at
Fri May 10 12:39:44 PDT 2013

Mike Stay wrote:
> On Fri, May 10, 2013 at 1:07 PM, Brendan Eich<brendan at>  wrote:
>> What's wrong with the iteration protocol?
> Nothing at all for arrays.  For every other monad, there's no sugar:
> the only monad multiplication that's supported is list concatenation.

Iteration is much more general than "arrays".

Can you give an example (with the latest LRT syntax, and arrows) that 
shows what is lost?

Monads, I know 'em, but they remind me of these interminable 
Future/Promise threads, and then I want to lie down till the feeling 
goes away. :-/

>> Again, we're not doing control effects the way you might want given a clean
>> slate.
> Sure, but has never been pure.  Anyone who wants purity
> won't be using JavaScript.  I was just hoping that since we have
> special syntax for one monad, we could use it for all of them.

What special syntax for what monad?

Monads with pretend purity are nice until runtime bugs bite.


More information about the es-discuss mailing list