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
///<summary> | |
///Saw a thing about Currying in javascript frameworks, thought I'd throw the ability to do similar in C# | |
/// (Somewhere in this https://news.ycombinator.com/item?id=8652348) | |
///</summary> | |
public static class CurryExtensions | |
{ | |
//Supplying 1 value | |
public static Func<T2, TOut> Curry<T1, T2, TOut>(this Func<T1, T2, TOut> func, T1 value) | |
{ | |
return x => func(value, x); |