Table of Contents

Method Bind

Namespace
SodaFlow.Functional
Assembly
SodaFlow.Functional.dll

Bind<T, TResult>(Maybe<T>, Func<T, Maybe<TResult>>)

The bind method for the Maybe<T> monad, which transforms an Maybe<T> into an Maybe<T>.

public static Maybe<TResult> Bind<T, TResult>(this Maybe<T> value, Func<T, Maybe<TResult>> transformation)

Parameters

value Maybe<T>

The Maybe<T> value to transform.

transformation Func<T, Maybe<TResult>>

The transformation function, which takes a value of type T contained in the monad and transforms it into a new monad of type Maybe<T>.

Returns

Maybe<TResult>

The Maybe<T> which results from transforming value using transformation.

Type Parameters

T

The type of the value contained in the monad to transform.

TResult

The type of the value contained in the resulting monad.