Skip to content

Glossary: Swift Basics

map

Also written: filter

Collection methods that take a closure: `map` makes a new array by applying it to each item, and `filter` keeps the items for which it returns `true`.

Where the book teaches it

Related terms

reduceclosuresorted