Created
July 7, 2013 23:37
-
-
Save takuoka/5945389 to your computer and use it in GitHub Desktop.
CoffeeScriptのfor文の注意点 ref: http://qiita.com/entotsu@github/items/9af5f5eeed0ecd8ed9d5
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
for i in [0..n-1] | |
for j in [i+1..n-1] |
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
for (i = _s = 0, _ref11 = n - 1; 0 <= _ref11 ? _s <= _ref11 : _s >= _ref11; i = 0 <= _ref11 ? ++_s : —_s) { | |
for (j = _t = _ref12 = i + 1, _ref13 = n - 1; _ref12 <= _ref13 ? _t <= _ref13 : _t >= _ref13; j = _ref12 <= _ref13 ? ++_t : —_t) { |
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
for (i = 0; i < n; i++ ){ | |
for ( j = i+1; j < n; j++ ){ |
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
for i in [0..n-1] | |
for j in [i+1..n-1]` | |
if i+1 <= n-1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment