Function Types
Syntax
<function-type> ::=
fn(
<types>?)
<return-type>?<types> ::= <type> (
,
<type>)<return-type> ::=
->
<type>
Examples
let f: fn();
let g: fn(bool) -> bool;
let h: fn(num) -> fn(bool, bool) -> bool;
Syntax
<function-type> ::=
fn(
<types>?)
<return-type>?<types> ::= <type> (
,
<type>)<return-type> ::=
->
<type>
let f: fn();
let g: fn(bool) -> bool;
let h: fn(num) -> fn(bool, bool) -> bool;