Skip to content

let-values

Compare
Choose a tag to compare
@tfeb tfeb released this 20 Dec 09:00
· 7 commits to main since this release
v9.0.0

let-values provides four let-style macros which work with multiple values.

  • let-values and let*-values are like let and let* respectively
  • let-values* and let*-values* have semantics like multiple-value-call: they take all the values from a number of initforms and use them, in parallel and sequentially respectively.

As an example of let-values*

> (let-values* (((a b c) (values 1 2) 3))
    (+ a b c))
6

There are also improvements to valid-type-specifier-p: it now works by checking that typep can't signal an error, which I think can't be evaded the way SBCL evades things with subtypep.