Algebraic Data Types in Swift

11 thoughts
last posted Feb. 8, 2015, 9:19 p.m.

9 earlier thoughts

0

Sorry to say, Beta 5 still doesn't support recursive enums!!

Unless

enum Tree { case Empty case Leaf(Int) case Node(Tree, Tree) }

isn't the right way to do it.

But the above continues to crash the REPL.

1 later thought