Refactoring Swift code for testability

John Sundell describes pure functions and dependency injection - two techniques we can apply when refactoring Swift code to make it more testable.