Last active
December 3, 2015 15:04
-
-
Save xkr47/cb78792d0678def748ec to your computer and use it in GitHub Desktop.
Ceylon Web Runner: ceylon precedence fun
This file contains 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
//$webrun_wrapped | |
shared void run() { | |
value cn = "foo.bar"; | |
print(cn[(cn.lastIndexWhere((Character ch) => ch == '.') else 0) ...]); | |
// vs | |
print(cn[(cn.lastIndexWhere((Character ch) => ch == '.') else 0)+1 ...]); | |
// vs | |
print(cn[ cn.lastIndexWhere((Character ch) => ch == '.') else 0 ...]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Click here to run this code online