Miscellany
Closures, Context and Capture -Part Deux
- FURTHER DOWN THE RABBIT-HOLE
- When Something is “Captured,” Can We Affect it Outside of Our Closure Scope?
- I see your global-context closure, and raise you a class-bound closure.
- What About “
self
“? How Does That Factor Into a Capture Scenario? - What Context Governs the captured entities? Declaration, Instantiation or Execution?
- Can We Use “unowned” Instead of “weak”?
- CONCLUSION
- SAMPLE PLAYGROUND
Swift Functions
- FUNCTION SIGNATURES
- Standard Swift Parameters
- Standard Swift Parameters, with Argument Labels
- Wildcard (Unnamed) Swift Parameters
- Function Signatures Varied by Return Type
- Mixing Parameter Names, Wildcards and Argument Labels
- Named Parameters and Function Types (Variables)
- CLOSURES
- APPLYING DEFAULT VALUES TO PARAMETERS
- VARIADIC FUNCTION PARAMETERS
- SAMPLE PLAYGROUND