| Generated: Monday, November 14, 2011, 09:24:00 | Copyright © 2011 , Kurt Nørmark |  |
SchemeDoc Demo
Kurt Normark Aalborg University, Denmark
LAML Source file: examples/schemedoc/scheme-documentation-tools/prog1a.scm
This is a brief example of a Scheme program with SchemeDoc comments, using the documentation mark style.
|
1 Factorials. |
| This section demonstrates a plain function. |
|
| fac |
| Form | (fac n) |
| Description | The factorial function. Also known as n! |
| Precondition | n >= 0 |
| Parameters | n | An integer |
| Returns | n * (n-1) * ... * 1 |
|
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 |
|
| tail |
| Form | (tail pair) |
| Description | An alias of cdr. |
| Parameters | pair | A cons cell |
| Returns | The second component of a cons cell |
|