Gifu/Source/Curry.swift

4 lines
90 B
Swift
Raw Normal View History

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) } }
}