term | definition | varieties | Scheme examples |
action |
a type of instruction within a program. When an action is run,
the the program interacts for a specific period of time
with the computer and its environment.
When complete, an action supplies a result value
(though it is common for the result to be trivial). |
|
- Print something, returning a trivial value.
- Do nothing but return.
- Wait for user.
|
argument |
an expression which is combined with a function expression
to indicate a call to the function. When the function is called, the argument is evaluated to provide a value. | | (cons a (quote ())) has 2 arguments. |
the value, or one of the values supplied to a function at the time it is called |
|
The function (lambda (x) (cons x '())) could be called with its argument being the atom philip , in which case the function would return the list (philip) . |
atom |
- in Lisp or Scheme, a basic value that is either null, or is not a list
- in The Little Schemer, a basic value that is not a list
|
number | the number 4 which is written 4 |
boolean | the false boolean value which is written #f |
name | the name fuzz . In a an expression, a name must be quoted, as 'fuzz or (quote fuzz) , which both evaluate to the same atom. |
function | (lambda (x) (cons x '())) evaluates to a function value, which is displayed as #procedure . |
boolean | relating to the two-valued system of true/false,
studied by Boole, a 19th century mathematician |
| written #t and #f |
evaluate |
to find the value of an expression by performing the operations (i.e. function calls) indicated. In Lisp and Scheme, a quote operation yields the quoted value unchanged. |
|
- (cons 'a '(b c)) evaluates to (a b c).
- '(a b c) evaluates to (a b c).
|
expression |
a part of a program, which tells what value to compute, and whose value may depend on the names to which it refers. |
literal data | (quote hello) |
literal function | (lambda (x) (- 1 x)) |
function call | (cons atm '()) |
parameter reference | lat |
function |
a value which can be called with one or more arguments, transforming them to produce a result value. A function doesn't do anything else. |
|
The Gambit Scheme interpreter uses the term procedure to indicate a function. |
list | a value consisting of 0 or more elements in a
particular order. The fundamental operations
on a list tell whether the list is null,
and break it up to provide the first element
and a list of the remaining elements. |
|
The following expressions evaluate to lists:'() or (quote ()) (the null list)
(cons x lat)
(cdr lat)
The following are examples of how lists appear when displayed:
()
(a b c)
(a 3 #t (sub))
|
null | having no elements (describing a list) |
parameter |
a name in a lambda expression (i.e. a function definition) which takes on the value of a corresponding argument, when that function is called.
The parameter name is introduced at the beginning of the lambda, and can
be used anywhere in the body of the lambda to represent the value of
the corresponding argument. |
|
(lambda (x) (- 1 x)) |
type |
a category of values with common behavior or purpose |
|
lists, numbers, lists of atoms, and booleans |
value |
a result of evaluation. When a name (e.g. a parameter or defined name) is bound,
it is bound to a value. |
number | 3 |
boolean | #t |
function | lambda (x) (- 1 x) |
structure | the list (a 3 #t) |
other | splat |