In the student languages' signature (type) annotations, function
mixed is used to describe mixed data or, as they are sometimes
called in HtDP, itemizations:
(define StringOrInteger (signature (mixed String Integer)))
An itemization is usually described in HtDP with the structured
natural language form:
A StringOrInteger is one of:
- a String
- an Integer
Having one-of as a synonym of mixed would help make formal type
declarations closer to the structured natural language form used in
HtDP:
(define (StringOrInteger (signature (one-of String Integer))
In the student languages' signature (type) annotations, function
mixedis used to describe mixed data or, as they are sometimescalled in HtDP, itemizations:
(define StringOrInteger (signature (mixed String Integer)))An itemization is usually described in HtDP with the structured
natural language form:
Having
one-ofas a synonym ofmixedwould help make formal typedeclarations closer to the structured natural language form used in
HtDP:
(define (StringOrInteger (signature (one-of String Integer))