Ben Lesh

Results 270 comments of Ben Lesh

@bakkot What about promises in an `AsyncIterable` helper? ``` someAsyncIterable.flatMap(async* () => { yield 'hi' }) // vs someAsyncIterable.flatMap(async () => { return 'hi' }) // vs someAsyncIterable.flatMap(() => 'hi')...

> primitive iterables throw @ljharb I presume that `string` is a "primitive iterable". Are there others in other runtimes? Or is this just a generic direction in case others are...

> primitive Tuples That's an interesting case. I'm not sure what people would mean if they were like `source$.pipe(concatMap(() => #[1, 2]))` (or whatever the syntax is now). I feel...

Still curious about this: > What about promises in an AsyncIterable helper? And further, I'm not totally sure what this would do: ```ts someAsyncIterable.flatMap(async function* () { yield* someOtherAsyncIterable; })...

Great! Thank you for answering these questions. Very helpful.

> iterable helpers, it's adding iterator helpers. There is, unfortunately, no generic "Iterable prototype" to put stuff on, so this stuff only applies to iterators specifically. That's interesting. I guess...

Oh... To be clear, there are ways you can create all of the same APIs over Observer. And they're single use too, it's just that they're often stateless. Duality still...

> can't remove what wasn't added? Oh. Sorry. I meant, if in the example above `a` is hit the first run, but not the second, do we remove it from...

This is interesting. How will this handle the asynchronous nature of Observables? Assuming something like this: (I don't actually know the API) ``` js var myObservable = Rx.Observable.interval(1000); var index...