Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Monacs - Collection of basic monads and functional extensions for C#

This library provides few core types and functions that can help you start writing C# code in more functional way. It also encourages use of Railway Oriented Programming approach.

Monacs uses type and function names similar to F#. That's intentional and it should make potential transition to F# easier. Some people may prefer Haskell type names (e.g. Maybe instead of Option) or LINQ-like function naming (e.g. Select instead of Map) - if that's your preference, you can always fork this library and change the names accordingly :)

Build Status

Target platform and language versions

Currently the library is build against .NET 4.6.1, .NET Standard 1.3 and .NET Standard 2.0. To use the library you need to have .NET 4.6.1+ or .NET Core 1.0+ project with C# language version 6 or higher.


You can find docs and guides here. There is also a sample project being developed using this library - you can find it here.

Want more?

If you're into functional programming and you're stuck in the .NET platform (or just like it) then you should definitely go with F# programming language! Not only most of what is provided by Monacs library is already there, but you also have much better defaults in the language (immutability anyone?). There are also great libraries to go with Railway Oriented Programming like Chessie, so be sure to check it out.

If you really need to stick to C# and this library is not enough then you can try much more comprehensive library Language Extensions - it probably has everything which this library covers and much, much more.


It's currently work-in-progress, expect new things to be added, APIs to be changed and docs to be updated more or less often. First publicly available version was released on NuGet.


If you've found any errors or missing functionalities in the provided library feel free to report an issue using GitHub. You can also contribute by sending pull requests with bug fixes or enhancments.

The develop branch should be used as a base for contributions, and I recommend rebasing on newest version of this branch when creating pull request. If you'd like to help but don't know where to look, start with issues marked as up-for-grabs.


This code is provided as is, without any warranties, as specified in MIT license.