/// <summary> /// Projects the <paramref name="source"/> signal into a new signal /// using the <paramref name="selector"/> function and flattens the result into a new signal. /// </summary> public static IReadableSignal <TResult> SelectMany <TSource, TResult>( this IReadableSignal <TSource> source, Func <TSource, IReadableSignal <TResult> > selector) { CheckValue(source, nameof(source)); CheckValue(selector, nameof(selector)); return(source.Select(selector).Flatten()); }
/// <summary> /// Projects the <paramref name="source"/> signal into a new signal /// that reacts to all changes but drops the original value. /// </summary> public static IReadableSignal <Unit> DropValue <T>(this IReadableSignal <T> source) { CheckValue(source, nameof(source)); return(source.Select(value => Unit.Instance)); }