3.4 Special Types and Type Constructors
closure_type ::= "&" "(" [arg_types] ")" [type_decl]
(The syntax of arg_types is specified along with signatures in section 3.3.4.)A closure type of the form
&(t1,...,tN):tR
describes a closure whose eval method has the signature:
signature eval(&(t1,...,tN):tR, t1, ..., tN):tR
Closure types are related by implicit subtyping rules that reflect standard contravariant subtyping: a closure type of the form &(t1,...,tN):tR is a subtype of a closure type of the form &(s1,...,sN):sR iff each ti is a supertype of the corresponding si and tR is a subtype of sR.
Generated with Harlequin WebMaker