Skip to content

Commit 13befa5

Browse files
committed
Add missing example output
Reduce items to evade excessive output.
1 parent 6dbce64 commit 13befa5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lang-guide/chapters/types/basic_types/closure.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,15 @@ Closures are used in Nu extensively as parameters to iteration style commands li
7171
1. You can also use [pipeline input as `$in`](pipelines.html#pipeline-input-and-the-special-in-variable) in most closures instead of providing an explicit parameter. For example:
7272

7373
```nu
74-
1..10 | each { print $in }
74+
1..5 | each { print $in }
75+
# => 1
76+
# => 2
77+
# => 3
78+
# => 4
79+
# => 5
80+
# => ╭────────────╮
81+
# => │ empty list │
82+
# => ╰────────────╯
7583
```
7684

7785
1. You can also pass closures themselves into a pipeline assuming the next command knows how to consume it. For example, the `do` example can be rewritten as:

0 commit comments

Comments
 (0)