Skip to content

,System.Func{--0,--0},System.Func{--0,--1})}

Signal.Iterate(TState, Func, Func, Func) method

Defined in

Type: Signal Namespace: ReactiveUI.Primitives.Reactive.Signals Assembly: ReactiveUI.Primitives.Reactive.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

public static IObservable<TResult> Iterate<TState, TResult>(TState initialState, Func<TState, bool> condition, Func<TState, TState> iterator, Func<TState, TResult> resultSelector)

View source

Summary: Generates a finite signal from state. Alias of Unfold.

Type parameters

NameDescription
TStateThe type of the state.
TResultThe type of the result.

Parameters

NameTypeDescription
initialStateTStateThe initial state.
conditionFuncThe condition that determines whether to continue.
iteratorFuncThe function that advances the state.
resultSelectorFuncThe function that produces the result from the state.

Returns: IObservable -- An Signals.