Skip to content

Instantly share code, notes, and snippets.

@brodo
Last active December 17, 2015 16:19
Show Gist options
  • Save brodo/5637455 to your computer and use it in GitHub Desktop.
Save brodo/5637455 to your computer and use it in GitHub Desktop.
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