Gifu/Source/Curry.swift

5 lines
128 B
Swift
Raw Normal View History

2015-01-23 00:02:08 +00:00
/// One of my favorite indian spices.
2015-01-20 19:44:15 +00:00
func curry<A, B, C>(f: (A, B) -> C) -> A -> B -> C {
return { a in { b in f(a, b) } }
}