File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ Produce a list of values in the record, converted to string
60
60
61
61
```
62
62
63
- Produce a list that has "two" for each 2 in the input
63
+ ` null ` items will be dropped from the result list. It has the same effect as ` filter_map ` in other languages.
64
64
``` nu
65
65
> [1 2 3 2] | each {|e| if $e == 2 { "two" } }
66
66
╭───┬─────╮
@@ -91,13 +91,13 @@ Iterate over each element, keeping null results
91
91
```
92
92
93
93
## Notes
94
- Since tables are lists of records, passing a table into ' each' will
94
+ Since tables are lists of records, passing a table into ` each ` will
95
95
iterate over each record, not necessarily each cell within it.
96
96
97
97
Avoid passing single records to this command. Since a record is a
98
- one-row structure, ' each' will only run once, behaving similar to 'do' .
99
- To iterate over a record's values, try converting it to a table
100
- with ' transpose' first.
98
+ one-row structure, ` each ` will only run once, behaving similar to [ ` do ` ] ( /commands/docs/do.md ) .
99
+ To iterate over a record's values, use [ ` items ` ] ( /commands/docs/items.md ) or try converting it to a table
100
+ with [ ` transpose ` ] ( /commands/docs/transpose.md ) first.
101
101
102
102
## Subcommands:
103
103
You can’t perform that action at this time.
0 commit comments