Waystone.Monads.Linq
7.7.0
dotnet add package Waystone.Monads.Linq --version 7.7.0
NuGet\Install-Package Waystone.Monads.Linq -Version 7.7.0
<PackageReference Include="Waystone.Monads.Linq" Version="7.7.0" />
<PackageVersion Include="Waystone.Monads.Linq" Version="7.7.0" />
<PackageReference Include="Waystone.Monads.Linq" />
paket add Waystone.Monads.Linq --version 7.7.0
#r "nuget: Waystone.Monads.Linq, 7.7.0"
#:package Waystone.Monads.Linq@7.7.0
#addin nuget:?package=Waystone.Monads.Linq&version=7.7.0
#tool nuget:?package=Waystone.Monads.Linq&version=7.7.0
Waystone.Monads.Linq
Adds Select, SelectMany and Where to Waystone.Monads, so C# query
syntax works over Option and Result.
The core package deliberately does not ship these names. Map, AndThen and
Filter are the vocabulary it teaches, and a second spelling of each on the
core type would mean every reader learning both. Install this package if you
want query syntax; ignore it and nothing changes.
Install
dotnet add package Waystone.Monads.Linq
Then import the namespace wherever you want the names in scope. The using is
the opt-in — without it, the operations are still only Map, AndThen and
Filter:
using Waystone.Monads.Linq;
Why query syntax
Rust's ? operator early-returns on None or Err, so a multi-step chain
reads as straight-line code. C# has no ?, and the method-syntax translation
nests one lambda per step. A query expression does not:
Option<Quote> quote =
from customer in FindCustomer(id)
from address in customer.PostalAddress
from rate in RateFor(address)
select Price(customer, rate);
Every clause after the first is a SelectMany, and each short-circuits: the
first None ends the query and no later delegate runs.
The same works over a Result, where the first Err ends the query and is the
error that surfaces. Every clause must share one error type — a step that fails
differently has to be mapped onto it first.
What maps to what
| Query clause | This package | Core member |
|---|---|---|
select |
Select |
Map |
second and later from |
SelectMany |
AndThen |
where |
Where |
Filter |
Each member is a one-line forward and adds no behaviour, so there is never a reason to prefer one spelling for correctness — only for how the call site reads.
Two things this package does not have
No where clause over a Result. Discarding an ok value would have to
invent the error that replaces it, and a signature taking an error factory is
not the one query syntax looks for. Filter before entering the query.
No …Async shapes. A query expression cannot await, so an async LINQ
name would buy only method-syntax parity with MapAsync, which the core
package already provides under the name it actually teaches.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Waystone.Monads (>= 7.7.0)
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 |
|---|---|---|
| 7.7.0 | 37 | 10/5/2026 |
| 7.6.0 | 35 | 10/5/2026 |
| 7.5.0 | 80 | 9/30/2026 |
| 7.4.0 | 98 | 9/15/2026 |
| 7.3.0 | 96 | 9/13/2026 |
| 7.2.0 | 95 | 9/9/2026 |
| 7.1.0 | 106 | 9/4/2026 |
| 7.1.0-beta.2 | 64 | 9/3/2026 |
| 7.1.0-beta.1 | 74 | 9/2/2026 |
| 7.0.1 | 97 | 8/30/2026 |
| 7.0.0 | 95 | 8/30/2026 |
| 7.0.0-beta.3 | 65 | 8/29/2026 |
| 7.0.0-beta.2 | 71 | 8/27/2026 |