Skip to content

Instantly share code, notes, and snippets.

@Eibwen
Eibwen / CurryExtensions.cs
Last active October 26, 2016 16:14
C# Curry Extensions
///<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);