Generated: June 7, 2005, 23:07:26 Copyright © 2005 , Kurt Nørmark The local LAML software home page

The program prog1

Kurt Normark ©

Source file: /user/normark/scheme/examples/tutorial/schemedoc/prog1.scm
LAML Version 27.0 (June 2, 2005, development)

This is a Scheme file with a few simple functions. The functions are written and organized with the purpose of demonstrating the LAML SchemeDoc tool.

Table of Contents:
1. A couple of higher order function. 2. The fac and fib functions.

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.
negate (negate p) A higher order functions which negates the predicate p.

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.

negate
Form (negate p)
Description A higher order functions which negates the predicate p. Negate accepts a predicate and returns the negated predicate.


1 A couple of higher order function.
These functions are useful in many situations.

fib
Form (fib n)
Description Calculated the fib function. Notice that this is a very inefficient Implementation.

fac
Form (fac n)
Description Calculate the factorial of n


2 The fac and fib functions.


Generated: June 7, 2005, 23:07:27
Generated by LAML SchemeDoc.
This documentation has been extracted automatically from the Scheme source file.