PSA: Collection casting is not free

Suyash Srijan
4 min readJun 25, 2019

Type casting is a really easy and convenient way to check the type of an instance or to convert its type to another type.

One of the operations we sometimes perform when dealing with collections is to convert it into a collection of something else. We accomplish this by using the map function.

For example:

Suyash Srijan

iOS Engineer at @theappbusiness. Swift compiler collaborator.