Skip to content

Signature definitions without signature #256

@bugcounting

Description

@bugcounting

We can use define to give a signature form (the way in which student
languages support type annotation) a name:

(define WeekDay (signature (enum "Mon" "Tue" "Wed" "Thu" "Fry" "Sat" "Sun")))

Since such definitions correspond to data (type) definitions in HtDP,
it would be convenient to have a variant of define that does not
need an explicit signature. Thus, the above definition could be
written as:

(define-type WeekDay (enum "Mon" "Tue" "Wed" "Thu" "Fry" "Sat" "Sun"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions