swift,curry
-> operator is right associative. So we can rewrite curry function like this. func curry<A, B, C>(f: (A, B) -> C) -> (A -> (B -> C)) { return { x in { y in f(x, y) } } Every ( matches with { inside return part. EDIT: Further explanation...