The special symbols described here are used as a notational convenience within this document, and are part of neither the Common Lisp language nor its environment.
(+ 4 5) => 9This means that the result of evaluating the form (+ 4 5) is 9. If a form returns multiple values, those values might be shown separated by spaces, line breaks, or commas. For example:
(truncate 7 5) => 1 2 (truncate 7 5) => 1 2 (truncate 7 5) => 1, 2Each of the above three examples is equivalent, and specifies that (truncate 7 5) returns two values, which are 1 and 2. Some conforming implementations actually type an arrow (or some other indicator) before showing return values, while others do not.
(char-name #\a) => NIL OR=> "LOWERCASE-a" OR=> "Small-A" OR=> "LA01"indicates that nil, "LOWERCASE-a", "Small-A", "LA01" are among the possible results of (char-name #\a)---each with equal preference. Unless explicitly specified otherwise, it should not be assumed that the set of possible results shown is exhaustive. Formally, the above example is equivalent to
(char-name #\a) => implementation-dependentbut it is intended to provide additional information to illustrate some of the ways in which it is permitted for implementations to diverge.
(function-lambda-expression (funcall #'(lambda (x) #'(lambda () x)) nil)) => NIL, true, NIL OR=> (LAMBDA () X), true, NIL NOT=> NIL, false, NIL NOT=> (LAMBDA () X), false, NIL
(gcd x (gcd y z)) == (gcd (gcd x y) z)This means that the results and observable side-effects of evaluating the form (gcd x (gcd y z)) are always the same as the results and observable side-effects of (gcd (gcd x y) z) for any x, y, and z.
(+ 1 (print (+ (sqrt (read)) (sqrt (read))))) |> |>>9 16 <<| |> 7 => 8shows an interaction in which "(+ 1 (print (+ (sqrt (read)) (sqrt (read)))))" is a form to be evaluated, "9 16 " is interactive input, "7" is interactive output, and "8" is the value yielded from the evaluation. The use of this notation is intended to disguise small differences in interactive input and output behavior between implementations. Sometimes, the non-interactive stream model calls for a newline. How that newline character is interactively entered is an implementation-defined detail of the user interface, but in that case, either the notation "<Newline>" or "{[<--~]}" might be used.
(progn (format t "~&Who? ") (read-line)) |> Who? |>>Fred, Mary, and Sally{[<--~]}<<| => "Fred, Mary, and Sally", false
Go to the first, previous, next, last section, table of contents.