A library for C# to enable functional, railway-oriented programming using common abstract data types
like Result
, Option
and Validation
. Also includes Roslyn-based analyzers and source generators
for generating union types, exhaustive Match
, and much more.
Visit the official documentation to get started.
FxKit is broken up into the following packages:
- FxKit: The core library. Can be used on its own.
- FxKit.CompilerServices: Roslyn analyzers and source generators.
- FxKit.CompilerServices.Annotations: Attributes used by the compiler services.
- FxKit.Testing: Contains test helpers for asserting on the FxKit types.
It is recommended to add the following global using
to make it easy to construct the core data types.
global using static FxKit.Prelude;
This makes functions like Some(value)
and Ok(value)
available everywhere.
MIT