Method Map
- Namespace
- SodaFlow
- Assembly
- SodaFlow.dll
Map<T, TResult>(Behavior<T>, Func<T, TResult>)
Transforms the values of a behavior with the given function. The behavior from this call has the value of that function on the value of the input behavior.
public static Behavior<TResult> Map<T, TResult>(this Behavior<T> b, Func<T, TResult> f)
Parameters
bBehavior<T>The behavior.
fFunc<T, TResult>Function to apply to change the values. It must be a pure function.
Returns
- Behavior<TResult>
A behavior which fires values transformed by
ffor each value fired by this behavior.
Type Parameters
TThe type of the behavior.
TResultThe type of values fired by the returned behavior.