Intermediate Swift: Map, Filter, Reduce, and FlatMap

The second day of the workshop will take you from a casual developer who uses map() now and then in your code to someone who can create and use Functors and Monads at will.

In the first half of the day we start with higher order functions and look at use the map, filter, reduce, and flatmap that are part of the Swift Standard Library.
In the second half we look at the shape of map and flat map and write our own versions to reduce the code needed to work with types that we create. We will end the day by creating a State type that we can use to obtain a result and the transformed State. You’ll find that this technique applies to much of the code you write and it makes your code more testable.

Date: 14 March 2018    

Related videos