Created
December 18, 2019 15:38
-
-
Save ythirion/fef78c0f4dfc85159eefd2a9afd65ae4 to your computer and use it in GitHub Desktop.
partial app
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, int> Multiply = (a, b) => a * b; | |
static Func<int, int> TwoTimes = par(Multiply, 2); | |
[Fact] | |
public void partial_app_example() | |
{ | |
Multiply(3, 4); // 12 | |
TwoTimes(9); // 18 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment