Algebraic Data Types in Swift

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

6 earlier thoughts

0

brosner found this:

@jopamer Hey, Swift looks really nice - wondering if enums can have recursive defs: enum Tree<T>{case Leaf(T); case Node(Tree<T>, Tree<T>)}?

— Carlos Scheidegger (@scheidegger) June 2, 2014

@scheidegger Thanks, Carlos! Not quite yet, but only because of a bug. I'm currently tracking it, and I'll look into addressing it soon

— Joe Pamer (@jopamer) June 2, 2014

4 later thoughts