Your first example with the "unbound variable" is due to your misspelling multiple-value-bind
. Try fixing the spelling; you should see a different result.
As to your second question, floor
returns two values, the floor and the remainder. Remember that values
is not the only function that returns multiple values!
So, basically, the multiple-value-bind
form looks like this:
(multiple-value-bind (var-1 .. var-n) expr
body)
where expr
is an expression that returns multiple values, which are bound to the variable names given in var-1 .. var-n
; those variables are available for use in body
. It is okay for expr
to return more or fewer values than are given as variables; nil
is used as the default value for any absent values, and any excess values are discarded.