public static Maybe <T> TryGet <T>(this ITryGet <int, T> self, int key) { T value = self.TryGet(key, out bool fail); return(fail ? default(Maybe <T>) : new Maybe <T>(value)); }
public static V TryGet <K, V>(this ITryGet <K, V> self, K key, V defaultValue) { V value = self.TryGet(key, out bool fail); return(fail ? defaultValue : value); }
public static Maybe <V> TryGet <K, V>(this ITryGet <K, V> self, K key) { V value = self.TryGet(key, out bool fail); return(fail ? default(Maybe <V>) : new Maybe <V>(value)); }