Table of Contents

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

b Behavior<T>

The behavior.

f Func<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 f for each value fired by this behavior.

Type Parameters

T

The type of the behavior.

TResult

The type of values fired by the returned behavior.