3.3 Type and Signature Declarations
let_decl ::= "let" ["var"] nameIf the result type of a closure is omitted, instead of defaulting to[type_decl]
":=" expr ";" closure_expr ::= [ "&" "(" [closure_formals] ")"[type_decl]
] "{" body "}" closure_formal ::= [name][type_decl]
formal names are optional, if never referenced
dynamic
as described in section 3.4.1, the result type is inferred from the type of the result expression in the closure's body. Similarly, if the type of a constant local variable is omitted, it is inferred from the type of its initializing expression; mutable variables and global variables should be given explicit types to avoid dynamic type checking.
Generated with Harlequin WebMaker