Monthly Archives: April 2016

Stones on a beach

Suppose that you arrange stones into a spiral on a sandy beach. After meticulously arranging your stone spiral, the world seems hell-bent on destroying it. A dog steps on some of the stones, a big wave carries some of them … Continue reading

Posted in Thoughts, Uncategorized | 8 Comments

Find keys by value in Swift dictionary

Here’s a helper method that might come in handy when working with a Swift dictionary. It finds every key mapped to a particular value. This is similar to the allKeysForObject(_:)┬ámethod of NSDictionary, but it is generic so it can return … Continue reading

Posted in Swift | Tagged