public static T?AsNullable <T>(this May <T> potentialValue) where T : struct { return(potentialValue.Select(e => (T?)e).ElseDefault()); }
public static May <T> Else <T>(this May <T> potentialValue, May <T> alternative) { return(potentialValue.Else(() => alternative)); }
public static T ForceGetValue <T>(this May <T> potentialValue) { return(potentialValue.Match( e => e, () => { throw new InvalidOperationException("No Value"); })); }
public static May <T> Unwrap <T>(this May <May <T> > potentialValue) { return(potentialValue.Bind(e => e)); }
public static T ElseDefault <T>(this May <T> potentialValue) { return(potentialValue.Else(default(T))); }