Last active
April 4, 2019 22:17
-
-
Save colinhumber/c1c35dc05aa32662ec6be7caf715b6e0 to your computer and use it in GitHub Desktop.
Recursive Wizard Step
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typealias SomeContent = String | |
indirect enum Step { | |
case step1(SomeContent, Step?) | |
case step2(SomeContent, Step?) | |
case step3(SomeContent, Step?) | |
} | |
let step1 = Step.step1("Step 1 data", nil) | |
let step2 = Step.step2("Step 2 data", step1) | |
let step3 = Step.step3("Step 3 data", step2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment