Aalborg University, Denmark

This is a brief demo example of an Elucidative Program

This Elucidative program consists of two tiny source programs: prog1 and prog2. The first of these was used for illustration of SchemeDoc, in terms of a prog1 interface manual.

1.1 Introduction

The function filter makes use of the tail-recursive function, filter-help, which iteratively carries out the filtering. Due to use the iterative processing in filter-help, we need to reverse the result in filter, .

Composition of two or more functions can be done by the function compose. The function handles two special cases first, namely the trivial composition of a single function , the typical composition of two functions , and composition of more than two functions .

It is some times useful to be able to generate a 'less-than-or-equal' function from an explicitly given enumeration ordering. This is done by the function generate-leq. Values of the enumeration-order are supposed to occur as constituents of some data structure. The selector function selector accesses the enumertion values within the data structure. Enumeration values are compared using eq-eq?, which is an optional parameter of generate-leq . Notice the pattern used for handling of optional parameters, and in particular the use of the function optional-parameter.

It is - of course - possible to link applied names in one source program to the defining name in another source file. See the list other-source-list which refers to the defined names in another source program.