public static Func> Curry(this Func source) { return x => y => source(x, y); } public static Func>> Curry(this Func source) { return x => y => z => source(x, y, z); } public static Func UnCurry(this Func> source) { return (x, y) => source(x)(y); } public static Func UnCurry(this Func>> source) { return (x, y, z) => source(x)(y)(z); } public static Func Compose(this Func source, Func func) { return x => func(source(x)); }