Wrap.Either
1.4.0
See the version list below for details.
dotnet add package Wrap.Either --version 1.4.0
NuGet\Install-Package Wrap.Either -Version 1.4.0
<PackageReference Include="Wrap.Either" Version="1.4.0" />
<PackageVersion Include="Wrap.Either" Version="1.4.0" />
<PackageReference Include="Wrap.Either" />
paket add Wrap.Either --version 1.4.0
#r "nuget: Wrap.Either, 1.4.0"
#:package Wrap.Either@1.4.0
#addin nuget:?package=Wrap.Either&version=1.4.0
#tool nuget:?package=Wrap.Either&version=1.4.0
Wrap: Functional Monads for .NET
Functional monads for .NET (including Maybe - see example) for C# - to handle null values and exceptions better. Railway-oriented programming support via Linq extensions, method chaining, and fuly asynchronous throughout.
Types include:
Monad<T>Either<TLeft, TRight>Id<T>(support forint,uint,long,ulongandGuidvalue types)Maybe<T>(either:Some<T>orNone)Result<T>(either:Ok<T>orFailure)
View the Wiki for documentation.
History
Although this library is at v1, it brings together some mature projects I have been working on since 2019. It started with a Result<T> implementation which morphed into Maybe - which reached v10 in November 2025 - and I figured it would be best to have both.
At the same time I was maintaining a StrongId library - which reached v8.5 in November 2024 - to avoid using primitives for Entity IDs. I realised the similarities between Result<T>, Maybe<T> and Id<T> and decided to bring them all together in one library: Wrap.
Licence
Copyright
Copyright (c) 2019-2026 bfren (unless otherwise stated)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. net11.0 is compatible. |
-
net10.0
- Wrap.Common (>= 1.4.0)
-
net11.0
- Wrap.Common (>= 1.4.0)
-
net8.0
- Wrap.Common (>= 1.4.0)
-
net9.0
- Wrap.Common (>= 1.4.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Wrap.Either:
| Package | Downloads |
|---|---|
|
Wrap
All library |
|
|
Wrap.Either.Testing
Either.Testing library |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-beta.3 | 0 | 11/13/2026 |
| 2.0.0-beta.1 | 0 | 11/13/2026 |
| 1.4.0 | 55 | 11/11/2026 |
| 1.3.0 | 666 | 11/7/2026 |
| 1.2.10 | 600 | 10/28/2026 |
| 1.2.9 | 535 | 10/23/2026 |
| 1.2.8 | 603 | 9/16/2026 |
| 1.2.7 | 552 | 8/14/2026 |
| 1.2.6 | 948 | 7/3/2026 |
| 1.2.5 | 1,004 | 5/16/2026 |
| 1.2.4 | 523 | 4/22/2026 |
| 1.2.3 | 560 | 3/13/2026 |
| 1.2.2 | 261 | 3/6/2026 |
| 1.2.1 | 216 | 2/20/2026 |
| 1.2.1-beta.1 | 108 | 2/20/2026 |
| 1.2.0 | 691 | 2/17/2026 |
| 1.1.0 | 565 | 2/8/2026 |
| 1.1.0-beta.9 | 123 | 2/7/2026 |
| 1.1.0-beta.7 | 110 | 2/1/2026 |
| 1.1.0-beta.6 | 116 | 2/1/2026 |