1.11 Manipulating Simple HTML Documents: "docs.ss"
The teachpack provides three functions for creating simple “HTML” documents:
Annotation An Annotation is a symbol that starts with “<” and ends in “>”. An end annotation is one that starts with “</”.
Determines whether or not a value is a number, a symbol, or a string.
(annotation? x) → boolean? x : any/c
Determines whether or not a symbol is a document annotation.
(end-annotation x) → Annotation x : Annotation
Consumes an annotation and produces a matching ending annotation.
(write-file l) → true l : (list-of atom)
Consumes a list of symbols and annotations and prints them out as a "file".
Sample session: set teachpack to "docs.rkt" and click Run:
> (annotation? 0) false > (annotation? '<bold>) true > (end-annotation 0) end-annotation: not an annotation: 0 > (write-file (list 'a 'b)) a b