MonadicTypes.NET.Async
0.3.0-preview.2
dotnet add package MonadicTypes.NET.Async --version 0.3.0-preview.2
NuGet\Install-Package MonadicTypes.NET.Async -Version 0.3.0-preview.2
<PackageReference Include="MonadicTypes.NET.Async" Version="0.3.0-preview.2" />
<PackageVersion Include="MonadicTypes.NET.Async" Version="0.3.0-preview.2" />
<PackageReference Include="MonadicTypes.NET.Async" />
paket add MonadicTypes.NET.Async --version 0.3.0-preview.2
#r "nuget: MonadicTypes.NET.Async, 0.3.0-preview.2"
#:package MonadicTypes.NET.Async@0.3.0-preview.2
#addin nuget:?package=MonadicTypes.NET.Async&version=0.3.0-preview.2&prerelease
#tool nuget:?package=MonadicTypes.NET.Async&version=0.3.0-preview.2&prerelease
MonadicTypes.NET.Async
Fluent Task and ValueTask operators for MonadicTypes.NET results. This
package includes MonadicTypes.NET transitively.
Requirements
- .NET 10 or later
- Compatible with trimming and NativeAOT
Install
dotnet add package MonadicTypes.NET.Async --prerelease
Quick Start
using MonadicTypes;
using MonadicTypes.Async;
static ValueTask<Result<int, string>> ValidateAsync(int value) =>
ValueTask.FromResult(value > 0
? Result<int, string>.Ok(value)
: Result<int, string>.Fail("Value must be positive."));
Result<string, string> result = await Result<int, string>.Ok(21)
.BindAsync(ValidateAsync)
.Map(static value => (value * 2).ToString());
Operator Selection
| Underlying callback | Use |
|---|---|
| Synchronous | Map, Bind, or BindError |
ValueTask<T> |
MapAsync, BindAsync, or BindErrorAsync |
Task<T> |
MapTaskAsync, BindTaskAsync, or BindErrorTaskAsync |
The explicit Task names avoid ambiguous async lambda overloads. Do not wrap a
natural Task in ValueTask merely to use a different method name.
Completed ValueTask paths avoid Task and async-state-machine allocation. A genuinely pending operation still pays the cost of its underlying asynchronous work. Await each returned ValueTask exactly once.
Related Packages
| Package | Add it for |
|---|---|
MonadicTypes.NET.Effects |
Async operations that can throw |
MonadicTypes.NET.Generators |
Generated async callables on measured hot paths |
MonadicTypes.NET.Errors |
Standard structured errors |
Documentation
See async pipelines.
Apache-2.0. Developed with AI assistance.
Documented public members: 43
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- MonadicTypes.NET (>= 0.3.0-preview.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.0-preview.2 | 37 | 9/12/2026 |
| 0.3.0-preview.1 | 36 | 9/12/2026 |
| 0.2.0-preview.2 | 95 | 8/30/2026 |
| 0.2.0-preview.1 | 84 | 8/17/2026 |
| 0.1.0-preview.1 | 72 | 8/12/2026 |