Improved syntax for observable mapping and subscribing

Bob Myers rtm at
Fri Mar 23 14:38:26 UTC 2018

Could someone jog my memory about proposals for better syntax for
observable mapping and subscribing, if any?

I'm getting really tired of writing

foo$.pipe(map(bar => mapper(bar)))

I would much prefer to write something along the lines of

stream function fooMapper(foo$) {
  while async (const bar = foo$()) {
    emit mapper(bar);

Yes, I'm aware of all the potential issues here and this is just an
example, not an actual syntax proposal. I'm just wondering about any prior

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list