Created
December 18, 2019 15:22
-
-
Save ythirion/c3a80e17e44fea356345515a47a9b479 to your computer and use it in GitHub Desktop.
function composition
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
static Func<int, int> Add2 = x => x + 2; | |
static Func<int, int> Add3 = x => x + 3; | |
static int Add5(int x) => Add2.Compose(Add3)(x); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment