Top Banner
The Many Faces of Swift Functions Natasha Murashev @NatashaTheRobot
26
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Many Faces of Swift Functions

The Many Faces of Swift FunctionsNatasha Murashev @NatashaTheRobot

Page 2: The Many Faces of Swift Functions
Page 3: The Many Faces of Swift Functions
Page 4: The Many Faces of Swift Functions

Single Parameter

Page 5: The Many Faces of Swift Functions

External / Internal Parameter Name

Page 6: The Many Faces of Swift Functions

External / Internal Parameter Name

Page 7: The Many Faces of Swift Functions

Internal Parameter Name Only

Page 8: The Many Faces of Swift Functions

Parameter Names: Init vs Func

Page 9: The Many Faces of Swift Functions

External / Internal Parameter Name

Page 10: The Many Faces of Swift Functions

Multiple Parameters

Page 11: The Many Faces of Swift Functions

Multiple Parameters

Page 12: The Many Faces of Swift Functions

Multiple Parameters

Page 13: The Many Faces of Swift Functions

Default Parameters

Page 14: The Many Faces of Swift Functions

Default Parameters

Page 15: The Many Faces of Swift Functions

Variadic Parameters

Page 16: The Many Faces of Swift Functions

Variadic Parameters

Page 17: The Many Faces of Swift Functions
Page 18: The Many Faces of Swift Functions
Page 19: The Many Faces of Swift Functions

Return Type

Page 20: The Many Faces of Swift Functions

Optional Return Type

Page 21: The Many Faces of Swift Functions

Multiple Return Values

Page 22: The Many Faces of Swift Functions

Multiple Return Values

Page 23: The Many Faces of Swift Functions

Multiple Return Values

Page 24: The Many Faces of Swift Functions

Nested Functions

Page 25: The Many Faces of Swift Functions
Page 26: The Many Faces of Swift Functions

Questions?@NatashaTheRobot