Building async and concurrent versions of forEach and map
Let’s take a look at how we can utilize Swift’s built-in concurrency system when performing data transformations using functions like forEach and map.
Articles, podcasts and news about Swift development, by John Sundell.
Let’s take a look at how we can utilize Swift’s built-in concurrency system when performing data transformations using functions like forEach and map.
Let’s explore some of the lesser-known Formatter subclasses that ship as part of Apple’s platforms, and how those formatters can be really useful in certain situations.
How to validate email addresses in Swift using a dedicated RawRepresentable type and Foundation’s NSDataDetector API.
This week, let’s take a look at a few different ways that reducers can be used in Swift — ranging from transforming sequences, to accumulating asynchronous values using Apple’s new Combine framework, and beyond.
One way of transforming values in Swift is by mapping a collection into an array of new values, using a transform. The Swift standard library offers three main APIs for that kind of mapping — map, flatMap and compactMap. Let’s take a look at how they work.
Almost every Swift program uses collections in one way or another. Whether it's to store values to be displayed in some form of list, to keep track of observers, or caching data - collections are everywhere. This week, let's take a look at some of the standard library APIs that let us easily transform collections in a very functional way.