File: docs.html

package info (click to toggle)
drscheme 1%3A352-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 71,608 kB
  • ctags: 55,284
  • sloc: ansic: 278,966; cpp: 63,318; sh: 32,265; lisp: 14,530; asm: 7,327; makefile: 4,846; pascal: 4,363; perl: 2,920; java: 1,632; yacc: 755; lex: 258; sed: 93; xml: 12
file content (51 lines) | stat: -rw-r--r-- 1,557 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<html>
<head>
<title>Teachpack : Documents</title>
</head>
<body bgcolor="#ffffff" text="#000000"
      link="#009900" vlink="#007700" alink="#cc0000">

<a href="index.html">Teachpacks for How to Design Programs</a>

<h1>Documents</h1>

<hr> <h3><a name="docs.ss">docs.ss</a></h3> <!-- DOCNOTE="teach=docs.ss" -->

The teachpack <code>docs.ss</code> provides three operations:
<menu>
  <li> <code><a name="atom?">atom?</a> : SchemeValue -> bool</code>
  <br> which determines whether or not a
  Scheme value is a number, a symbol, or a string; <br>
  Note: This notion of atom is different from that in the compat.ss library.

  <li> <code><a name="annotation?">annotation?</a> : SchemeValue -> bool</code>
  <br> which determines whether or not a
  Scheme symbol is a document annotation;

  <li> <code><a name="end-annotation">end-annotation</a> : annotation -> annotation</code>
  <br>which consumes an annotation and
  produces a matching ending; and

  <li> <code> <a name="write-file">write-file</a> : (list-of atom) [string]-> void <code>
  <br> which consumes a list of annotated symbols
  and prints them out as a "file"; it returns nothing.
  if the string argument is present, it is interpreted as a file name:
  the words are written to this file; if the file exists, it is deleted
</menu>

<p>Sample session: set teachpack to <code>docs.ss</code> and execute:
<pre>
> (annotation? 0)
#f
> (annotation? '&lt;bold&gt;)
#t
> (end-annotation 0)
end-annotation: not an annotation: 0
> (write-file (list 'a 'b))
a b
</pre>

<br>
<br>
</body>
</html>