Extensions are used to extend the functionality of existing types in Swift. Extensions can add subscripts, functions, initializers, and computed properties. They can also make types conform to protocols.
Suppose you want to be able to compute the factorial of an Int. You can add a computed property...