| ||Copyright © 2007 , Kurt NÝrmark |
The program prog1
LAML Source file: examples/tutorial/schemedoc/prog1.scm
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.
1 The fac and fib functions.
|Form ||(fac n)|
|Description ||Calculate the factorial of n |
|Form ||(fib n)|
|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. |
|Form ||(negate p)|
|Description ||A higher order functions which negates the predicate p. Negate accepts a predicate and returns the negated predicate. |
|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. |