rewriteTo specification
This is the engineering specification for the MotionObservable operator: rewriteTo.
Overview
rewriteTo emits the provided value every time it receives a new upstream value.
Example usage:
stream.rewriteTo(100)
upstream value | downstream
0.50 100 | 100
0.25 100 | 100
0.00 100 | 100
-0.25 100 | 100
-0.50 100 | 100
MVP
Expose a rewriteTo operator API
Use _map to implement the operator. Accept a constant of type U. Emit this value when a
new upstream value is received.
class MotionObservable {
public func rewriteTo<U>(_ value: U) -> MotionObservable<U>