Last active
December 17, 2015 16:19
-
-
Save brodo/5637455 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Action<IMaybe<TA>> LiftToMaybe<TA>(this Action<TA> func) where TA : class | |
{ | |
return param => | |
{ | |
var justparam = param as Just<TA>; | |
if (justparam == null || justparam.Value == null) return; | |
func(justparam.Value); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment