{"size": 1259, "ext": "scrbl", "max_stars_repo_path": "htdp-doc/teachpack/htdp/scribblings/docs.scrbl", "max_stars_repo_name": "bdeket/htdp", "max_stars_repo_stars_event_min_datetime": "2015-01-14T20:28:41.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T04:04:26.000Z", "max_issues_repo_path": "htdp-doc/teachpack/htdp/scribblings/docs.scrbl", "max_issues_repo_name": "bdeket/htdp", "max_issues_repo_issues_event_min_datetime": "2015-01-14T19:50:21.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-19T21:38:00.000Z", "max_forks_repo_path": "htdp-doc/teachpack/htdp/scribblings/docs.scrbl", "max_forks_repo_name": "bdeket/htdp", "max_forks_repo_forks_event_min_datetime": "2015-01-14T19:11:38.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-24T05:11:39.000Z"}
{"max_stars_count": 85, "max_issues_count": 132, "max_forks_count": 81, "avg_line_length": 29.9761904762, "max_line_length": 111, "alphanum_fraction": 0.7267672756}
#lang scribble/doc

@(require scribble/manual "shared.rkt"
          (for-label racket teachpack/htdp/docs))

@teachpack["docs"]{Manipulating Simple HTML Documents}

@;declare-exporting[teachpack/htdp/docs]
@defmodule[#:require-form beginner-require htdp/docs]

The teachpack provides three functions for creating simple ``HTML'' documents: 

@deftech{Annotation} An @tech{Annotation} is a symbol that starts with ``<''
and ends in ``>''. An end annotation is one that starts with ``</''.

@defproc[(atom? [x any/c]) boolean?]{Determines whether or not a value
is a number, a symbol, or a string.} 

@defproc[(annotation? [x any/c]) boolean?]{Determines whether or not a
symbol is a document annotation.} 

@defproc[(end-annotation [x (unsyntax @tech{Annotation})]) (unsyntax @tech{Annotation})]{Consumes an annotation
and produces a matching ending annotation.} 

@defproc[(write-file [l (list-of atom)]) true]{
Consumes a list of symbols and annotations and prints them out as a
"file".}

Sample session: set teachpack to @filepath{docs.rkt} and click Run:
@(begin
#reader scribble/comment-reader
(racketblock
> (annotation? 0)
false
> (annotation? '<bold>)
true
> (end-annotation 0)
end-annotation: not an annotation: 0
> (write-file (list 'a 'b))
a b 
))
