Perils of duplicate finding 14 February 2024 Given an array of integers ([1, 2, 3, 1, 3, 1]), find the elements which are duplicated. No, we’re not interviewing. I’m trying to prevent a user from specifying a reserved value twice. Elsewhere in the file I already have duplicate detection for object tags. val dupes: Map<Int, […]
When writing asynchronous code using Combine, we might sometimes want to share the result of a given set of concurrent operations, rather than performing duplicate work for each one. Let’s take a look at how the share operator can enable us to do that in a really neat way. As an example, let’s say that […]