You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CatchAsync over a ValueTask, and TraverseAsync on Option and Patch #88
The roadmap's 2.3.0 section lists CatchAsync over a ValueTask, and TraverseAsync on Option and Patch.
Result.CatchAsync takes a Func<Task<T>>/Func<Task>; a ValueTask goes through .AsTask() or an async lambda (Core README, "A ValueTask … is rejected when called").
Option<T>.Traverse and Patch<T>.Traverse exist (ResultExtensions.cs), and TraverseAsync exists on a sequence, but not on an Option or a Patch.
Proposal
CatchAsync overloads over Func<ValueTask<T>> and Func<ValueTask>, with the narrowed <T, TException> forms, catching as the Task forms do (an exception after the first await, cancellation as the Task forms treat it).
Option<T>.TraverseAsync and Patch<T>.TraverseAsync over Func<T, Task<Result<TResult, TError>>>, with the CancellationToken forms, as the synchronous Traverse and the sequence's TraverseAsync behave: None/Absent/Null never call the selector.
Done when
Each new member has the behaviour tests its Task or synchronous sibling has, and the surface tables in docs/ list them (checked by reflection).
Overload resolution: an async lambda given to CatchAsync still binds as before (a test pins the existing calls).
Activity
CaffeinatedCoder commentedon Oct 28, 2026
Done in PR #94, merged into release/2.3.0.