🎉 Cyber Monday Sale! Save 30% when you subscribe today.
There was more than a year break from when we first covered parsers to when we picked up the topic again, and so we dedicated a few episodes to recapping everything we accomlished last time while also making a few ergonomic improvements along the way. We also used our parser knowledge to build a CLI tool from scratch that can process and pretty print the logs output from xcodebuild
and swift test
.
Parsing is just one of many problems functional programming solves by defining a core, composable, transformable unit. We apply these exact same techniques to randomness and even app architecture!
The zip function shows up on many types: from Swift arrays and Combine publishers, to optionals, results, and even parsers! But zip on parsers is a little unlike zip on all of those other types, and because of this it can make building parsers a little more unwieldy. Let’s explore why and how to fix it.