In the student languages' signature (type) annotations, a
define-struct with name struct also defines signature forms
Struct and StructOf. For example:
(define-struct name [first last])
; name-full inputs instances of `name` where both fields are strings
(: name-full ((NameOf String String) -> String))
(define (name-full n) (string-append (name-first n) " " (name-last n)))
; the constructor of `name` returns an instance of type `Name`
(: make-name (Any Any -> Name))
In the student languages, there is a predefined struct called
posn. However, the type names Posn and PosnOf are not
defined. Can we provide these definitions as part of the student
languages?
In the student languages' signature (type) annotations, a
define-structwith namestructalso defines signature formsStructandStructOf. For example:In the student languages, there is a predefined
structcalledposn. However, the type namesPosnandPosnOfare notdefined. Can we provide these definitions as part of the student
languages?