Created
March 2, 2017 06:56
-
-
Save takopom/0b47e5cc03df519965860432d34a0431 to your computer and use it in GitHub Desktop.
Arrayの特定の区間の値を合計する
This file contains hidden or 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
| let sum = values[from..<to].reduce(0, +) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment