Improved syntax for observable mapping and subscribing

Bob Myers rtm at gol.com
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
art.

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180323/e800dc2c/attachment.html>


More information about the es-discuss mailing list