I've already looked into this kind of thing myself privately. I came up with this last year [1], and I more recently came up with this [2] (the second is much better IMHO). Both of those offer solutions to this problem, and they do in fact offer ways for 1. iteration, and 2. mapping/filtering/etc.
[1]: https://github.com/isiahmeadows/non-linear-proposal [2]: https://github.com/isiahmeadows/lifted-pipeline-strawman ----- Isiah Meadows [email protected] Looking for web consulting? Or a new website? Send me an email and we can get started. www.isiahmeadows.com On Fri, Mar 23, 2018 at 11:06 AM, Thomas Grainger <[email protected]> wrote: > You can convert an observable into an async iterator. You have to choose > between discarding or buffering uniterated items > > On 23 Mar 2018 14:39, "Bob Myers" <[email protected]> wrote: >> >> 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 >> >> >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

