Skip to content

Instantly share code, notes, and snippets.

@FreeMasen
Last active May 18, 2016 19:53
Show Gist options
  • Save FreeMasen/5a607cd29f3a6fe0c32aa62666beea47 to your computer and use it in GitHub Desktop.
Save FreeMasen/5a607cd29f3a6fe0c32aa62666beea47 to your computer and use it in GitHub Desktop.
enum Example {
  case First
  case Second
}

enum AnotherExample {
  case First
  case Second
}

var exampleInALargeScope: Example = .First
var anotherExampleInALargeScope = AnotherExample.Second

func smallerScope(firstVar: Example, secondVar: AnotherExample) {
  if firstVar == .First {
    //do stuff
  }
  
  if secpmdVar == .Second {
    //do different stuff
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment