Generated: Monday, November 14, 2011, 09:14:44 A SchemeDoc Manual

SchemeDoc Demo

Kurt Normark Aalborg University, Denmark

Source file: /user/normark/scheme/styles/xml-in-laml/schemedoc-2/man/stylesheet-examples/scheme/prog1.scm

Abstract. This is a brief example of a Scheme program with multi-semicolon SchemeDoc comments. We have used this example in the paper "Scheme Documentation tools". Here the example is used to illustrate the use of different CSS stylesheets.

Table of Contents:
1. Factorials. 2. List selection functions.

Alphabetic index:
fac (fac n) The factorial function.
head (head pair) An alias of car.
tail (tail pair) An alias of cdr.


1 Factorials.
This section demonstrates a plain and well-known function, namely the factorial function.

fac
Form (fac n)
Description The factorial function. Also known as n! The factorial function multiplies the numbers from 1 to n.
Precondition n >= 0
Parameters n An integer
Returns n * (n-1) * ... * 1
See also Scheme source file fac


2 List selection functions.
This section demonstrates two aliased functions.

head
Form (head pair)
Description An alias of car.
Parameters pair A cons cell
Returns The first component of a cons cell
See also Scheme source file head

tail
Form (tail pair)
Description An alias of cdr.
Parameters pair A cons cell
Returns The second component of a cons cell
See also Scheme source file tail

Generated: Monday, November 14, 2011, 09:14:44
Generated by LAML SchemeDoc using LAML Version 38.0 (November 14, 2011, full)