Lecture overview -- Keyboard shortcut: 'u'  Previous page: Functions [Section] -- Keyboard shortcut: 'p'  Next page: Evaluation of parenthesized expressions in Scheme -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 1 - Page 26 : 49
Programming Paradigms
Introduction to Functional Programming in Scheme
The function concept

The conceptual starting point is the well-known mathematical concept of functions

The notational starting point is lambda calculus

  • The mathematical function concept

    • A mapping from a domain to a range

    • A function transfers values from the domain to values in the range

      • A value in the domain has at most a single corresponding value in the range

    • Totally or partially defined functions

    • Extensionally or intensionally defined functions

An extensionally defined function is defined by a set of pairs, enumerating corresponding elements in the domain and range. Notice that this causes practical problems if there are many different values in the domain of the function. An intensionally defined function is based on an algorithm that describes how to bring a value from the domain to the similar value in the range. This is a much more effective technique to definition of most the functions, we program in the functional paradigm.

  • Lambda calculus

    • A very terse notation of functions and function application