MonadicTypes.NET.Async 0.3.0-preview.2

This is a prerelease version of MonadicTypes.NET.Async.
dotnet add package MonadicTypes.NET.Async --version 0.3.0-preview.2
                    
NuGet\Install-Package MonadicTypes.NET.Async -Version 0.3.0-preview.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MonadicTypes.NET.Async" Version="0.3.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MonadicTypes.NET.Async" Version="0.3.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="MonadicTypes.NET.Async" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MonadicTypes.NET.Async --version 0.3.0-preview.2
                    
#r "nuget: MonadicTypes.NET.Async, 0.3.0-preview.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MonadicTypes.NET.Async@0.3.0-preview.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MonadicTypes.NET.Async&version=0.3.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MonadicTypes.NET.Async&version=0.3.0-preview.2&prerelease
                    
Install as a Cake Tool

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.

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.

Complete API reference

Documented public members: 43

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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