Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion book/cheat_sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ slice first list values:
╰───┴───────────╯
```

iterate over a list; `it` is current list value:
iterate over a list; `elt` is current list value:

```nu
> let planets = [Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune]
Expand Down
4 changes: 2 additions & 2 deletions book/working_with_lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ $scores | where $it > 7 # [10 8]
```

The [`reduce`](/commands/docs/reduce.md) command computes a single value from a list.
It uses a block which takes 2 parameters: the current item (conventionally named `it`) and an accumulator
It uses a block which takes 2 parameters: the current item (conventionally named `elt`) and an accumulator
(conventionally named `acc`). To specify an initial value for the accumulator, use the `--fold` (`-f`) flag.
To change `it` to have `index` and `item` values, use the [`enumerate`](/commands/docs/enumerate.md) filter.
To change `elt` to have `index` and `item` values, use the [`enumerate`](/commands/docs/enumerate.md) filter.
For example:

```nu
Expand Down
4 changes: 2 additions & 2 deletions de/book/working_with_lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ echo $scores | where $it > 7 # [10 8]
```

Der [`reduce`](/commands/docs/reduce.md) Befehl berechnet einen einfachen Wert aus einer Liste.
Der darauffolgende Block enthält 2 Parameter: Das momentane Element (üblicherweise `it` genannt)
Der darauffolgende Block enthält 2 Parameter: Das momentane Element (üblicherweise `elt` genannt)
und einen Sammler (Akkumulator) (üblicherweise `acc`). Um einen initialen Wert für den Akkumulator zu setzen,
wird das `--fold` (`-f`) Flag gesetzt. Um den Iterator `it` zu ändern nach `index` und `item`, wird wiederum
wird das `--fold` (`-f`) Flag gesetzt. Um den Iterator `elt` zu ändern nach `index` und `item`, wird wiederum
das `--numbered` (`-n`) Flag verwendet.
Zum Beispiel:

Expand Down