Lecture overview -- Keyboard shortcut: 'u'  Previous page: Expressions and values [Section] -- Keyboard shortcut: 'p'  Next page: Examples of expressions and their values -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home    Lecture 2 - Page 5 : 46
Functional Programming in Scheme
Expressions, Types, and Functions
Expressions, values, and types

We will now describe and characterize the important concepts of expressions, values and types.

Evaluation of an expression yields a value which belongs to a type

  • Expressions

    • Written by the programmer

    • Will typically involve one or more function calls

    • A Function - as written by the programmer - is itself an expression

Expressions are part of the source program, as written by the programmer.

A function expression is called a lambda expression. We will encounter these important expressions later in this material.

  • Values

    • Primitive as well as composite

    • A function expression is evaluated to a function object

The primitive values are those which cannot be decomposed into more primitive parts. Some of the important primitive values are numbers, the two boolean values (true and false), and the characters of some character set. Primitive values stand as a contrast to composite values, such as lists and arrays, which are aggregations of parts, each of which are compositive or primitive values themselves.

  • Types

    • A set of values with common properties

    • Type checking can be used to validate a program for certain errors before it is executed