Created
January 28, 2017 15:09
-
-
Save chrisalexander/3e0cb6ba807e95d48c1cad792b5fa28c 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
// Arbitrary function | |
let doValidate x = | |
x > 3 | |
// Arbitrary execution function | |
let doExecute x = 0 | |
// Validate and return function to execute | |
let validate x = | |
match doValidate x with | |
| true -> Some (fun () -> doExecute x) | |
| false -> None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment