Skip to content

Instantly share code, notes, and snippets.

@bitwalker
bitwalker / Option.cs
Created July 11, 2014 20:32
Implementation of Option<T> in C#
using System;
namespace Types
{
public static class Option
{
public static Option<T> ToOption<T>(this T @this)
{
if (@this == null)
return Option<T>.None;