EventStream Operations - seadowg/milo GitHub Wiki
Operations:
These are the operations an EventStream should support:
map
- map each element of the stream using the given functionfilter
- return a stream that only contains elements that render a true value with the given functionmerge
- interleave (using implicit timestamps) the receiver and passed streamszip
- return a stream where element is the corresponding element of the receiver and given streams ie. ((t1,x), (t2, y)) where t2 = min(ev2.filter(_.time <= t1)) or vise versatake
- returns the first n elements of the stream (useful for optimisation?)takeWhile
- conditional version of take producing a possibly finite streamscan
- take a zero value and a function and apply the function result of the last computation and the current element (first computation being the zero value)