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
/// Emits the n-th and n-1th events as a pair.
/// The first event won't be emitted until the second one arrives.
pairwise does not emit the first value, since it is not a pair yet. However this makes using pairwise cumbersome.
Even if the first state emitted is not a pair, I still would like to use it. So maybe we could emit a pair the first time by the help of a dummy constant like pairwise.Empty()
[pairwise.Empty(), 1], //---->I want to get this
[1, 2],
[2, 3],
etc.
If there is a way to cleanly do this without changing pairwise, I would be very glad to hear your thoughts. Maybe using combine2 somehow?
The text was updated successfully, but these errors were encountered:
As stated by the docs:
pairwise
does not emit the first value, since it is not a pair yet. However this makes usingpairwise
cumbersome.Even if the first state emitted is not a pair, I still would like to use it. So maybe we could emit a pair the first time by the help of a dummy constant like
pairwise.Empty()
If there is a way to cleanly do this without changing pairwise, I would be very glad to hear your thoughts. Maybe using
combine2
somehow?The text was updated successfully, but these errors were encountered: