Generated: Saturday, June 9, 2007, 15:03:55 A SchemeDoc Manual

Scheme Source Linking Demo

Kurt Nørmark normark@cs.aau.dk Department of Computer Science Aalborg University Denmark

Source file: /user/normark/scheme/examples/tutorial/schemedoc/man/../prog5.scm

This is a demo manual, written to show additional aspects of SchemeDoc. In particular Scheme source linking.

Table of Contents:
1. Mutatator and Selector functions. 3. A couple of higher order function.
2. The fac and fib functions. 4. Another function

Alphabetic index:
compose (compose f g) A higher order function that composes two functions.
fac (fac n) Calculate the factorial of n
fib (fib n) Calculated the fib function.
make-mutator-function (make-mutator-function n . optional-parameter-list) Make and return a mutator function which mutates element number n in a list.
make-selector-function (make-selector-function n [selector-name]) Returns a function, which selects element number n in a list.
my-as-string my-as-string An alias of as-string from the general LAML library.
negate (negate p) A higher order functions which negates the predicate p.


1 Mutatator and Selector functions.

make-selector-function
Form (make-selector-function n [selector-name])
Description Returns a function, which selects element number n in a list. The second parameter, which is optional, is used for error message purposes. In general, this parameter should be a string corresponding to the name of the selector function. If the second parameter is given, we check whether the list is long enough for selection. If not, we give a decent error message. We recommend use of the second parameter in order to avoid meaningless error messages. The first element is number 1. (make-selector-function 1) corresponds to car, (make-selector-function 2) corresponds to cadr, etc.
See also Scheme source file make-selector-function

make-mutator-function
Form (make-mutator-function n . optional-parameter-list)
Description Make and return a mutator function which mutates element number n in a list. The returned function takes a list and a new value as arguments. This function takes one optional parameter, which is the name of the mutator This is used for error message purposes.
See also Scheme source file make-mutator-function


2 The fac and fib functions.
These functions are found in the source file prog4.scm. The manual stuff for these is done via SchemeDoc. See also the other section.

fac
Form (fac n)
Description Calculate the factorial of n
See also Scheme source file fac

fib
Form (fib n)
Description Calculated the fib function. Notice that this is a very inefficient Implementation.
See also Scheme source file fib


3 A couple of higher order function.
These functions are useful in many situations. You may also consult the first section.

negate
Form (negate p)
Description A higher order functions which negates the predicate p. Negate accepts a predicate and returns the negated predicate.
.parameter In case I need to start this line with a dot, which is not an internal tag.
Parameters p A predicate
See also Scheme source file negate

compose
Form (compose f g)
Description A higher order function that composes two functions. Returns a function which applies f on g. Both f and g are supposed to take a single argument.
Returns Return value description
See also Scheme source file compose
section abc
section SECTION2
Note Miscelaneous information
Internal remark Internal comment


4 Another function

my-as-string
Form my-as-string
Description An alias of as-string from the general LAML library.
See also Scheme source file my-as-string

Generated: Saturday, June 9, 2007, 15:03:55
Generated by LAML SchemeDoc using LAML Version 32.2 (June 7, 2007, full)