Lecture overview -- Keyboard shortcut: 'u'  Previous page: A page with graphics -- Keyboard shortcut: 'p'    Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Page 4 : 4
LENO Tutorial Demo
A page with a source program

LENO is often used for teaching material about programming. Therefore the source-program LENO element is important.

(define (negate p)
  (lambda (x) 
    (if (p x) #f #t)))

The negate function. This function is really from the SchemeDoc part of the LAML tutorial.

;; Calculate the factorial of n.
;; .parameter n An integer
;; .pre-condition The integer must be non-negative.
;; .returns n!
(define (fac n)
  (if (= 0 n) 1 (* n (fac (- n 1)))))

The fac function. This is the classical recursive edition of fac.

/user/normark/scheme/examples/tutorial/leno/single-lecture-content/../../schemedoc/prog3.scmThe fib function.

This is the classical recursive edition of fib, which is very time consuming.