Pattern matching over recursive values in Swift

Swift’s value types are almost able to represent algebraic data types. Unfortunately, they fall short of the mark when it comes to recursion, and while they’ve announced that their solution, indirect cases, will ship in a later build of Swift 2, there’s still reason to want them today.

On the Order of Neptune

Inscribe the orbit of Neptune in a square.