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

Declaring New Primitives

The form (type: multiple-arity-schema . attr) declares new primitive of type multiple-arity-schema. The additional optional attributes attr can be used to describe additional aspects of the primitives behavior. Some example definitions are:

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

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



PLT