Skip to content

Commit 6ca5724

Browse files
committed
Remove outdated section on closure type signatures
In Nu 0.107.0, closures *can* have optional and default values in their type signatures.
1 parent c6ba1a2 commit 6ca5724

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

lang-guide/chapters/types/type_signatures.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,3 @@ and `false` if not present.
7979

8080
You cannot use the `bool` type as a flag annotation as that is the same
8181
as the the existence or not of the occurrence of the flag.
82-
83-
## Closure parameters
84-
85-
(TODO: Needs update for changes in 0.92)
86-
87-
In Nu, closures have a simpler kind of type annotations for parameters
88-
than custom commands. Basically, closures can have type annotations for their
89-
parameters but not optional or default values.
90-
91-
E.g. An annotated closure:
92-
93-
```nu
94-
let cl = {|x: int, y: string| $"x: ($x), y: ($y)" }
95-
do $cl 88 'hello'
96-
# => x: 88, y: hello
97-
```

0 commit comments

Comments
 (0)