Skip to content

Instantly share code, notes, and snippets.

@takuoka
Created July 7, 2013 23:37
Show Gist options
  • Save takuoka/5945389 to your computer and use it in GitHub Desktop.
Save takuoka/5945389 to your computer and use it in GitHub Desktop.
CoffeeScriptのfor文の注意点 ref: http://qiita.com/entotsu@github/items/9af5f5eeed0ecd8ed9d5
for i in [0..n-1]
for j in [i+1..n-1]
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) {
for (i = 0; i < n; i++ ){
for ( j = i+1; j < n; j++ ){
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