Making Impossible States Impossible
We discuss how Swift's type system can be used to eliminate impossible states from our code.
Episode 153 · May 24 2019
With Swift, we've seen a resurgence of functional programming patterns in the iOS community. This collection shows examples of functional programming.
18 Episodes · 6h55min
We discuss how Swift's type system can be used to eliminate impossible states from our code.
Episode 153 · May 24 2019
We implement fold on the CommonMark syntax tree and use it to extract links and text from a document.
Episode 152 · May 17 2019
We explore the differences between reduce and fold and how they can be implemented on any enum.
Episode 151 · May 10 2019
Wouter joins us to explore the origins of the reduce function.
Episode 150 · May 03 2019
We show a refactoring of the view code in the Swift Talk backend that allows us to pass around dependencies automatically using a functional pattern.
Episode 141 · Mar 01 2019
We extend a basic Markdown library using protocol composition to add support for syntax highlighting in Swift code blocks.
Episode 91 · Mar 09 2018
We implement a concurrent version of the map method for arrays.
Episode 90 · Mar 02 2018
We show how protocol composition can be used to design extensible libraries, thereby solving the so-called "Expression Problem."
Episode 89 · Feb 23 2018
We discuss the capabilities and limitations of enums and classes when designing extensible libraries.
Episode 88 · Feb 16 2018
We look at different techniques for wrapping analytics APIs in Swift and discuss their advantages and disadvantages.
Episode 83 · Jan 12 2018
We refactor a simple flow layout to have a functional interface, disentangling the layout code from UIKit code.
Episode 82 · Jan 05 2018
Building on the binary search tree code from episode #56, we implement red-black trees as self-balancing tree data structures and benchmark their performance.
Episode 58 · Jul 14 2017
We look at binary search trees as an alternative to last episode's sorted array implementation. We benchmark the performance of insertion and lookup in both data structures, with some surprising results.
Episode 56 · Jun 30 2017
We build a flexible sort descriptor abstraction on top of Swift's native sort methods, which is dynamic and type safe.
Episode 19 · Oct 07 2016
We implement some of the more challenging parts of parser combinators.
Episode 16 · Sep 16 2016
Join us in the functional programming gym to stretch your object-oriented comfort zone while we lay the groundwork for a parser combinator library.
Episode 15 · Sep 09 2016
We add customizable styles to our CommonMark renderer from episode #2.
Episode 4 · Jul 01 2016
We create attributed strings from CommonMark. We continually refactor our code to make the central logic short and understandable.
Episode 2 · Jun 17 2016