Stop show with sound -- Keyboard shortcut: 'x'  Next slide in show -- Keyboard shortcut: 'n'  2 minutes, 35 secondsHigher-order Functions - slide 34 : 34

Generation of a leq predicate from enumeration
In some contexts we wish to specify a number of clauses in an arbitrary order

For presentational clarity, we often want to ensure that the clauses are presented in a particular order

Here we want to generate a leq predicate from an enumeration of the desired order



(define simple-leq? 
  (generate-leq '(z a c b y x) id-1))

(sort-list '(a x y z c c b a) simple-leq?)
(z a a c c b y x)
 (form '(show-table rows))
 (title "show-table")
 (description "Presents the table, in terms of rows")
 (parameter "row" "a list of elements")
 (pre-condition "Must be placed before the begin-notes clause")
 (misc "Internally, sets the variable lecture-id")
 (result "returns an HTML string")
The functions generate-leq and the helping function list-index .
An application of generate-leq which sorts the manual clauses.