Reactive Extensions API in depth: Zip

Download this episode

Download Video

Description

In this episode of the Rx API in depth, Jeff talks about the Zip operator in Rx.

Visit the Reactive Extensions DevLabs page to download and learn more about Rx.

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      Tom Lokhorst

      Cool, I was waiting for this video!

       

      But what if xs produces faster than ys? Will Zip start caching or will it drop xs and always match up the last x and the last y?

    • User profile image
      J.Van.Gogh

      Zip will start caching. On Thursday we'll explain CombineLatest which is like what you're describing as the second option...

    • User profile image
      exoteric

      That's good. Observable.Zip should not change behavior from Enumerable.Zip.

    • User profile image
      Tom Lokhorst

      Great!

       

      Is there also a combinator that will duplicate the latest of either the left or the right stream? Such that the result is as fast as the fastest stream (after the initial value has been yielded).

       

      If it doesn't exist it can probably be implemented using SelectMany and Until.

    • User profile image
      J.Van.Gogh

      That's actually what CombineLatest does. We're missing one that will not duplicate but does take the latest unused value (cache of one, with consumption), will talk to Wes and Erik to see if that would be a useful operator...

    • User profile image
      staceyw

      Shouldn't zip be Join instead?  With join, you have other compositions.  For every x, join with y's (respecting an optional predicate selecting x's and related y's).  It can be relational.  Maybe you already have that.  I think with base selectors such as Select, Join and Choice, you can compose most other things.

    • User profile image
      J.Van.Gogh

      There is a Join operator that implements the Join-Calculus, we'll do a future video on that operator for sure!

    • User profile image
      pajocomo

      Why is the sound of Rx epsiodes so low?

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.