Lecture overview -- Keyboard shortcut: 'u'  Previous page: The <span>let*</span> name binding construct -- Keyboard shortcut: 'p'  Next page: The <span>letrec</span> namebinding construct -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Introduction to Functional Programming in Scheme - slide 40 : 49

An example with let*
(define (how-many-days-hours-minutes-seconds n)
  (let* ((days     (quotient n seconds-in-a-day))
         (n-rest-1 (modulo n seconds-in-a-day))
         (hours    (quotient n-rest-1 seconds-in-an-hour))
         (n-rest-2 (modulo n-rest-1 seconds-in-an-hour))
         (minutes  (quotient n-rest-2 60))
         (seconds  (modulo n-rest-2 60))
        ) 
    (list days hours minutes seconds)))
how-many-hours-minutes-seconds-full.scm
A typical example using sequential name binding - all details.