Closed linkdotnet closed 6 months ago
There are cases where you are not interested in the absolut value of a signal, but you want to calculate on the current value.
Given a simple +1 counter or pagination where you are just interested in increasing the value.
+1
public sealed class Signal<T> : MemoHandlR<T> { + public async Task Set(Func<T, T> updateFunc); }
Alternatively a new Update method could be helpful:
Update
public sealed class Signal<T> : MemoHandlR<T> { + public async Task Update(Func<T, T> updateFunc); }
This already exists: MemoizR/EagerRelativeSignal.cs
Fair enough :)
There are cases where you are not interested in the absolut value of a signal, but you want to calculate on the current value.
Given a simple
+1
counter or pagination where you are just interested in increasing the value.API Proposal
Alternatively a new
Update
method could be helpful: