Skip to content

Instantly share code, notes, and snippets.

@schwern
Created May 13, 2017 00:13
Show Gist options
  • Save schwern/45ae0a14eda5702c2a3766e690540f1a to your computer and use it in GitHub Desktop.
Save schwern/45ae0a14eda5702c2a3766e690540f1a to your computer and use it in GitHub Desktop.
This is why whitespace should not be syntax. One is a syntax error, one is not. Can you guess?
for i, j := 0, len(r)-1;
i < len(r)/2;
i, j = i+1, j-1
{
r[i], r[j] = r[j], r[i]
}
for i, j := 0, len(r)-1;
i < len(r)/2;
i, j = i+1, j-1 {
r[i], r[j] = r[j], r[i]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment