📖 Documentation: This documentation reflects the active development version. For stable release documentation, visit https://fabiolune.github.io/functional-utils/
A comprehensive set of functional programming extension methods for C# that enables a functional-first approach in .NET projects. Built on top of LanguageExt, this library provides fluent APIs for common functional patterns.
Install the library via NuGet:
dotnet add PROJECT package Fl.Functional.Utils --version <version>Fl.Functional.Utils bridges the gap between C#'s object-oriented nature and functional programming paradigms. It provides:
- Fluent transformation pipelines with
Map,Bind, andTee - Safe null handling with
Option<T>andEither<TLeft, TRight>types - Resource management with functional
Usingpatterns - Pattern matching utilities for cleaner conditional logic
- Tail recursion support to prevent stack overflows
- Async-first design with full async/await support
| Feature | Description |
|---|---|
| Map | Transform values in fluent pipelines |
| Bind | Chain operations that return functional types |
| Tee/TeeWhen | Inject side effects without breaking chains |
| MakeOption/MakeEither | Convert values to functional types |
| Match | Pattern match on functional types |
| Using | Resource management in functional style |
| Tail Recursion | Stack-safe recursive algorithms |
| ForEach | Null-safe iteration over collections |
- API Reference - Detailed documentation with examples for all utilities
- Online Documentation - Complete documentation site
- Getting Started - Introduction and setup guide
├── Fl.Functional.Utils/ # Main library source code
│ ├── *.cs # Core utility functions
│ ├── Recursion/ # Tail recursion utilities
│ └── README.md # Detailed API documentation
├── tests/ # Test suite
│ └── Fl.Functional.Utils.Tests/
├── docs/ # Documentation source
└── README.md # This file