Skip to content

Instantly share code, notes, and snippets.

@colinhumber
Last active April 4, 2019 22:17
Show Gist options
  • Save colinhumber/c1c35dc05aa32662ec6be7caf715b6e0 to your computer and use it in GitHub Desktop.
Save colinhumber/c1c35dc05aa32662ec6be7caf715b6e0 to your computer and use it in GitHub Desktop.
Recursive Wizard Step
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