| | Generated: June 17, 2002, 13:59:51 |
The program prog1
Kurt Normark © Aalborg University
Source file: c:/users/kurt/scheme/examples/tutorial/schemedoc/prog1.scm
LAML Version 17.20 (June 1, 2002) development
| This is the demo program prog1 |
|
Table of Contents:
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. |
|
1. THE FAC AND FIB FUNCTIONS.
fac
| Description | | Calculate the factorial of n
|
|
fib
| Description | | Calculated the fib function.
Notice that this is a very inefficient
Implementation.
|
|
2. A COUPLE OF HIGHER ORDER FUNCTION.
These functions are useful in many situations.
negate
| Description | | A higher order functions which negates the predicate p.
Negate accepts a predicate and returns the negated predicate.
|
|
compose
| 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.
|
|
Generated: June 17, 2002, 13:59:51
This documentation has been extracted automatically from the Scheme
source file by means of the Schemedoc tool