Using Ranges, where clauses, and Tuples in Switch statements
Another Swift basics tutorial on iOS Scholar's Blog, where we discuss Tuples - an advanced data type in Swift and using Tuples in Switch statement, a combination which has some powerful pattern matching potential.
Using hash for shorthand, modifying parameter values, reflecting them back and more...
In this second tutorial of Functions in Swift on iOS Scholar's Blog, we discuss shorthand for External Parameters, Default parameters, their implicit external parameter behaviour, Variable parameters to modify values of otherwise immutable function parameters and Inout Parameters to reflect the changes made to parameter values back in calling scope.
Annotate Parameters, Returned Values and more...
Functions in Swift, Apple's new programming language, are extremely flexible and very powerful. They can return multiple values and external parameters can be used to label the parameters while invoking the functions.
Iterating over Ranges, Collections and more
Swift, Apple's new programming language has a for loop construct, the for..in loop. Check out the syntax complete with examples and explanation.