Lecture overview -- Keyboard shortcut: 'u'  Previous page: Recursion versus iteration -- Keyboard shortcut: 'p'  Next page: Example of recursion: <span>number-interval</span> -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 2 - Page 4 : 35
Programming Paradigms
Recursion and Higher-order Functions
Tail Calls

A tail call of f in g occurs if g returns the result of f directly

In Scheme, tail calls must be implemented efficiently as jumps - the stack frame of g is discarded when f is called

Guy Steele: Tail calls are GOTOs with parameters

(define (g ...)
  ....
  (f ...))

Tail call.

c:/Users/Kurt/Teaching-material/Pp-Scheme-17/notes/includes/tail-call-examples.scmExample of tail calls and non tail calls.