[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Quotation regarding QUOTE
In the discussions of QUOTE, it would be useful to keep in mind its origins.
Consider the following:
In order that constants can always be distinguished from
variables however, they will be quoted. That is, a 2-list
will be formed whose first element is the keyword QUOTE
and whose second element is the constant. Hence the constants
127, NIL, (A B) and X will be represented by the S-expressions
(QUOTE 127), (QUOTE NIL), (QUOTE (A B)), (QUOTE X) respectively.
There is no exception to this rule: variables are *never*
quoted, constants are *always* quoted.
Functional Programming: Application & Implementation
Note that quotation is hardly required in Prolog since it has another
convention for distinguishing variables from constants.