Gifu/Source/Curry.swift

4 lines
90 B
Swift

func curry<A, B, C>(f: (A, B) -> C) -> A -> B -> C {
return { a in { b in f(a, b) } }
}