Function types

suggest change

Every function has a function type, made of its parameter types and its return type. For example:

func sum(x: Int, y: Int) -> Int { return x + y }

has a function type of:

(Int, Int) -> (Int)

A function type can itself be a parameter type or a return type.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents