You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When dealing with promises it would be nice to be able to do a stream.flatTap(_(save)) which would disregard the output but wait for the promise to resolve. (shorthand for stream.flatMap(item => _(save(item).then(() => item)))
The text was updated successfully, but these errors were encountered:
I guess I wouldn't mind adding something like this since we already have tap, but it would work with streams, not promises. Highland isn't a promises library, so the only direct integration point with promises is the constructor.
So stream.flatTap(save) would be shorthand for stream.flatMap(item => save(item).filter(() => false).append(item)), where save returns a Highland stream. Which means, when working with promises, you'd still have to do stream.flatTap(item => _(save(item))). At that point, I'm not sure it's saving you much at all.
When dealing with promises it would be nice to be able to do a
stream.flatTap(_(save))
which would disregard the output but wait for the promise to resolve. (shorthand forstream.flatMap(item => _(save(item).then(() => item)))
The text was updated successfully, but these errors were encountered: