Skip to content

Commit

Permalink
Merge pull request #10 from Atotti/kotsugi
Browse files Browse the repository at this point in the history
chap3を修正
  • Loading branch information
woodnx authored Dec 3, 2023
2 parents 7310872 + f68232b commit d666ba9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kotsugi/chapter03/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ ls2 = map(lambda l: l * l, ls)
```
- もう一個の例:配列の合計値を取得するJavaScriptプログラム
- reduce関数:
- 第一引数:配列の各要素に対して実行する即時関数.関数の第一引数`summing`は,それまでの値,第二引数`current`は今の要素の値
- 第二引数:初期値.最初はこの値が即時関数の第一引数`summing`に入る.
- 第一引数:配列の各要素に対して実行する無名関数.関数の第一引数`summing`は,それまでの値,第二引数`current`は今の要素の値
- 第二引数:初期値.最初はこの値が即時関数の第一引数`summing`に入る.
- summingに値が足されていっているイメージ
```js
// 命令的アプローチ
Expand Down

0 comments on commit d666ba9

Please sign in to comment.