Treehouse Intermediate Course - Part 10 (Closures 1)
Yes! So completes the aim to get four consecutive days! I actually enjoyed generics more than I thought - the concepts were so difficult but it was interesting finding out about them. Now onto closures - the area of Swift that I find hardest of all! This is apparently a 146 minute course, so I'll likely need at least 5 or 6 entries for this. 24 separate steps, so yes - similar to generics in terms of length! After that, the other iOS intermediate track (there is some crossover there with the Swift one), has a few other projects and bits. So that will be next! OK, let's go! Start Time - 12:22 Functions as Data A key point already is that closures are not a type. It is more that they are 'anonymous functions'. Simple functions - a recap! func printString( _ string: String ) { print ( "Printing the string passed in: \ ( string )" ) } printString ( "Jeff" ) We can create a constant/variable and assign a function to it. No ar...