Skip to content

Instantly share code, notes, and snippets.

@ezura
Created March 10, 2018 04:24
Show Gist options
  • Save ezura/4d8b8c0b2c09fe49fb50bdf37c51d1c7 to your computer and use it in GitHub Desktop.
Save ezura/4d8b8c0b2c09fe49fb50bdf37c51d1c7 to your computer and use it in GitHub Desktop.
詳しく調べること: 演算の順番に関わらず、被演算子自身の評価は先頭から順番に行われる #swift #CodePiece
v1 + v2 + v3
// evaluation order: v1 v2 v3
v1 + v2 * v3
// evaluation order: v1 v2 v3
v1 + v2 * (v3 + v4) + v5
// evaluation order: v1 v2 v3 v4 v5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment