Power Tools: Closures & Array Methods
9 min · Swift
Write inline closures and transform arrays with map and filter.
Swift · Power Tools: Closures & Array Methods0/5 cleared
Enemy 1 of 5
A closure is a compact, unnamed function: { (params) -> ReturnType in expression }. Assign it to a let and call it like any function.
You
Syntax Skeleton
Loading editor...
Ln 1, Col 1Spaces: 4
Sign up to fightTarget output: 36