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:
Justin Ma
2022-03-01 21:05:29 +08:00
committed by GitHub
parent 2a89936bee
commit 42f1874a3a
11 changed files with 80 additions and 16 deletions

View File

@ -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)!"} }
```