Skip to content

Instantly share code, notes, and snippets.

@AndreyPanov
Last active November 4, 2017 08:26
Show Gist options
  • Save AndreyPanov/b2def60d3e45e2a02b84e219ffd15a3e to your computer and use it in GitHub Desktop.
Save AndreyPanov/b2def60d3e45e2a02b84e219ffd15a3e to your computer and use it in GitHub Desktop.
fileprivate enum LaunchInstructor {
case main, auth, onboarding
static func configure(tutorialWasShown: Bool, isAutorized: Bool) -> LaunchInstructor {
switch (tutorialWasShown, isAutorized) {
case (true, false), (false, false): return .auth
case (false, true): return .onboarding
case (true, true): return .main
}
}
}
@polac24
Copy link

polac24 commented Nov 4, 2017

case (true, false), (false, false): return .auth can be represented as:
case (_, false): return .auth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment