Fold
Creates a new TState
value by applying the given folder
function to state
and Option<T>.Some
option value. Otherwise returns the state
itself.
Parameters | Returns |
Func<TState, T, TState> folder TState state Option<T> option | TState |
Usage
This function applies the folder
function to the Option<T>
value and to the state
.
When the optional value IsNone
the folder
function won't be executed and the state
is returned as a result.
When the option value IsSome
When the option value IsNone
When the option value IsSome
When the option value IsNone
Last updated