Swift Overview - Enums and Structs
Enums Primarily used for a collection with a finite set of values enum PrimaryColor { case red case blue case yellow } Each case does not need to »
Enums Primarily used for a collection with a finite set of values enum PrimaryColor { case red case blue case yellow } Each case does not need to »
Closures are similar to lambdas in Python or Ruby. They are self contained chunks of code. Global and nested functions are closures, but are often not »
Intro Optionals are needed because swift disallows nil values in all other types aside from Optionals. This characteristic of not allowing nil values is not present »
Protocols and extensions are both tools swift uses to package modules of functionality that expand upon classes, enums and structs. Protocols can be shared across classes, »
Anatomy func functionName (parameterName: parameterType) -> returnType { statements to execute return object } External & Local Parameter Names Parameters can have two names in the function »