# accumulate 関数

リストの累積和。

## 書き方

### accumulate(list)

**list**

リスト。リストを受け取ります。

## 例題

- $\displaystyle \operatorname{accumulate}(\left[ 1, 2, 3 \right]) = \left[ 1, 3, 6 \right]$

  `accumulate([1, 2, 3])`

  ソルバーでは、`accumulate([1, 2, 3])` の答えは `[1, 3, 6]` です。

  [ソルバーで開く](https://ja.hilberon.com/?q=accumulate%28%5B1%2C%202%2C%203%5D%29)

## 関連する関数

- [append](https://ja.hilberon.com/library/append)

  末尾に要素を追加したリスト。
- [union](https://ja.hilberon.com/library/union)

  いずれかのリストに含まれる要素を、重複を除いて順に並べたもの。
- [apply](https://ja.hilberon.com/library/apply)

  式の先頭、またはリストの括弧を関数で置き換えます。
- [total](https://ja.hilberon.com/library/total)

  リストの要素の総和。
- [complement](https://ja.hilberon.com/library/complement)

  ほかのどのリストにも含まれない、リストの要素。
- [thread](https://ja.hilberon.com/library/thread)

  リストの対応する要素に関数を適用します。

---
Source: https://ja.hilberon.com/library/accumulate
