Skip to content

fabiolune/functional-utils

Repository files navigation

📖 Documentation: This documentation reflects the active development version. For stable release documentation, visit https://fabiolune.github.io/functional-utils/

Fl.Functional.Utils

dotnet Quality Gate Status codecov Mutation testing badge

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.

🚀 Quick Start

Install the library via NuGet:

dotnet add PROJECT package Fl.Functional.Utils --version <version>

🎯 Overview

Fl.Functional.Utils bridges the gap between C#'s object-oriented nature and functional programming paradigms. It provides:

  • Fluent transformation pipelines with Map, Bind, and Tee
  • Safe null handling with Option<T> and Either<TLeft, TRight> types
  • Resource management with functional Using patterns
  • Pattern matching utilities for cleaner conditional logic
  • Tail recursion support to prevent stack overflows
  • Async-first design with full async/await support

✨ Core Features

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

📚 Documentation

🏗️ Project Structure

├── 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages