using static LanguageExt.Prelude;
public class NullFreeProgram
public static void Main()
LinqPatternMatchingExample();
Console.WriteLine("Null free rocks!");
public static Unit LinqPatternMatchingExample()
Option<int> two = Some(2);
Option<int> four = Some(4);
var r1 = match(from x in two
var r2 = match(from x in two
public static Unit OptionExample()
var optional = Some(120);
int x2 = match( optional,
public static Unit AssertEqual(dynamic first, dynamic second)
throw new Exception($"Assertion failed: expected {first} to be {second}");