File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
lang-guide/chapters/types Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ There are several syntactic forms that can have type signatures:
1111
1212- Variable declarations
1313- Parameter declarations in custom commands and closures
14- - Input type declarations to custom commands
15- - Return type declarations from custom commands
14+ - Input and Return type declarations for custom commands
1615
1716The following code snippets illustrates these kinds of type signatures:
1817
@@ -25,6 +24,16 @@ def my-command [x: int, y: string] { }
2524
2625# Parameter declaration in closures
2726do {|nums : list<int>| $nums | describe} [ 1 2 3 ]
27+
28+ # Input and Return type declaration on a custom command
29+ def my-filter []: nothing -> list { }
30+
31+ # Multiple Input/Return type signatures on a custom command
32+ def my-filter []: [
33+ nothing -> list
34+ range -> list
35+ ] { }
36+
2837```
2938
3039For a further discussion on custom command signatures please refer to: [ Custom Commands] ( /book/custom_commands.html )
You can’t perform that action at this time.
0 commit comments