(index ("interface" 0) ("implementation" 635))
(def (sig (syntax "(interface NAME DEFINITION ...)" (id interface))) (p "Declares " (tt "NAME") " to be an " (i "interface") " that provides the definitions " (tt "DEFINITION ...") ". " (tt "DEFINITION") " should be a value definition of the form") (pre " (define NAME [VALUE])") (p "or") (pre " (define (NAME VAR ...) [BODY ...])") (p "The values and bodies of the given definitions are optional and default to " (tt "(void)") " (for value definitions) or a procedure that signals a runtime error (for procedure definitions). If a value/body is given, it provides a default for later implementations of this interface (see below)."))
(def (sig (syntax "(implementation NAME DEFINITION ...)" (id implementation))) (p "Defines an " (i "implementation") " of interface " (tt "NAME") ". An implementation is a record structure holding the given definitions. Note that " (tt "implementation") " returns a first-class object, in contrast to " (tt "interface") " which is a declaration.") (p "Each definition declared in the interface can be accessed by invoking the definition-name with an implementation as its sole argument."))
