Next: , Previous: , Up: Top   [Contents][Index]

2 Type annotations

Type annotations are special forms that make use of the brace syntax to associate a type specification to a lexical variable (see (vicare-scheme)brace). It works as follows:

(define (brace O <fixnum>)

in which the variable ‘O’ is defined as having type <fixnum>.

NOTE To use the extensions in a friendly manner we need to put the source code reader in ‘#!vicare’ mode, this way brace can be inserted using actual brace characters:

(define {O <fixnum>}