streamly icon indicating copy to clipboard operation
streamly copied to clipboard

Time related combinators

Open harendra-kumar opened this issue 7 years ago • 2 comments

We deal with two sequencing dimensions user specified ordering of stream and time ordering of stream. For example, the Ahead stream return values in the user specified sequence whereas the Async stream merges the events in time order. We have defined combinators that deal with sequence but we also need to define corresponding combinators that deal with time. #101 describes one such combinator takeTimed that corresponds to the regular take combinator. We need to define more such combinators in general corresponding to regular combinators that make sense in the time dimension.

harendra-kumar avatar Nov 22 '18 14:11 harendra-kumar

Maybe we can put these in a separate Time module so that we can give them exactly the same names as corresponding regular combinators. For example:

  • take - take up to some time
  • drop - drop until some time
  • filter - filter with a time based predicate, the stream has to be tagged with time, just like we tag with index in regular streams (e.g. in the index based combinators).

Another naming alternative is to use the t prefix just like we use the i prefix on index based combinators.

harendra-kumar avatar Nov 22 '18 14:11 harendra-kumar

Current development on PR #331

adithyaov avatar Dec 11 '19 12:12 adithyaov