/maybe-sharp

Implementation of the "Maybe" monad for C#, inspired by Rust language

Primary LanguageC#MIT LicenseMIT

Maybe Sharp

Rust-style implementation of the "Maybe" monad (In Rust, this monad is called Option) into C#

Usage (C#)

  1. Copy maybe.cs file into your project
  2. Put this at the top of your code
using MaybeSharp;
  1. Start using MaybeSharp in your code! (if you don't know how, the test.cs file shows example usages)

Usage (C# + .NET)

  1. Copy maybe.cs and maybe-dotnet.cs file into your project
  2. Put this at the top of your code
using MaybeSharp;
using MaybeDotnet;
  1. Start using MaybeSharp + MaybeDotnet in your code!