File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 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
6060
6161```
6262
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.
6464``` nu
6565> [1 2 3 2] | each {|e| if $e == 2 { "two" } }
6666╭───┬─────╮
@@ -91,13 +91,13 @@ Iterate over each element, keeping null results
9191```
9292
9393## 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
9595iterate over each record, not necessarily each cell within it.
9696
9797Avoid 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.
101101
102102## Subcommands:
103103
You can’t perform that action at this time.
0 commit comments