[previous] [up] [next]     [contents]
Next: Declaring Constructors Up: Extensions to DrScheme Previous: Polymorphic Annotations

Declaring New Primitives

The form (type: multiple-arity-schema) declares new primitive of type multiple-arity-schema. Some example definitions are:

(define my-car (type: (forall (a) ((cons a _) -> a))))

(define my-map (type: (forall (a r) ((a -> r) (listof a) -> (listof r)))))

The expression (type: ...) evaluates to void.



PLT