mirror of
https://github.com/nushell/nushell.git
synced 2025-08-17 07:21:13 +02:00
Update some examples and docs (#4682)
* Update some examples and docs * Update now.rs * Update date_now.md Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
This commit is contained in:
@ -21,3 +21,8 @@ Multiplies elements in list
|
||||
```shell
|
||||
> [1 2 3] | par-each { |it| 2 * $it }
|
||||
```
|
||||
|
||||
Iterate over each element, print the matching value and it's index
|
||||
```shell
|
||||
> [1 2 3] | par-each -n { |it| if $it.item == 2 { echo $"found 2 at ($it.index)!"} }
|
||||
```
|
||||
|
Reference in New Issue
Block a user