Skip to content

Instantly share code, notes, and snippets.

@ignazioc
Created January 10, 2018 00:12
Show Gist options
  • Save ignazioc/341c4ff3b3d864b0dd8110c85c4b49d2 to your computer and use it in GitHub Desktop.
Save ignazioc/341c4ff3b3d864b0dd8110c85c4b49d2 to your computer and use it in GitHub Desktop.
if v1 {
if (v2) {
print("tt")
} else {
print("tf")
}
} else {
if v2 {
print("ft")
} else {
print("ff")
}
}
switch (v1, v2) {
case (true, true):
print("tt")
case (true, false):
print("tf")
case (false, true):
print("ft")
case (false, false):
print("ff")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment