In this particular case I belive

func foo(int: Int) -> (Int) -> (String) -> String

is much more explicit and clear about what is what :

foo(int: Int) returns not Int(that returns then String and then String).

foo(int: Int) return function with (Int) parameter, that return func with (String) parameter that returns single String value.


On 20.04.2016 20:53, Chris Lattner via swift-evolution wrote:

On Apr 20, 2016, at 8:46 AM, BJ Homer <[email protected]> wrote:

How would this proposal affect curried functions? Would this:

 func foo(int: Int) -> Int -> String -> String

become this?

 func foo(int: Int) -> (((Int) -> String) -> String)

No, it becomes:

func foo(int: Int) -> (Int) -> (String) -> String

-Chris
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to