Created
June 13, 2010 17:20
-
-
Save wandernauta/436821 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
foo: func() -> Bool { | |
return false; | |
} | |
bar: func() -> Int { | |
return 0; | |
} | |
"First attempt: %s" format((bar() || foo() || 20) toString()) println() | |
"Second attempt: %s" format((foo() || bar() || 20) toString()) println() | |
"Should have printed: 20" println() |
This file contains hidden or 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
First attempt: 1 | |
Second attempt: true | |
Should have printed: 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment