next up previous contents
Next: Testing the basic abstractions Up: Discovering the Power of Previous: Application of associative lists   Contents

Miscellaneous abstractions

(define ndisp! (lambda (n)
                (print ((n incr) vmzero))))
(define bdisp! (lambda (b)
                (print (b vmtrue vmfalse))))
(define ldisp! (lambda (l)
                (if (nullp l) 
                       (ndisp! (car l))
                       (ldisp! (cdr l)))))))
(define four (succ three))
(define five (succ four))
(define six (mult two three))
(define seven (add three four))
(define eight (add four four))
(define nine (add four five))
(define ten (add five five))


Georg P. Loczewski 2004-03-05

Impressum und Datenschutz