Re:Admitting That Functional Programming Can Be Awkward (2007)
by fiddlerwoaroof on Saturday October 24, 2020 @05:36PM
(#24882132)
The return value of some forms is implementation dependent, but all forms return a value in CL:
CL-USER(1): (defparameter *foo* (declaim (special x)))
*FOO*
CL-USER(2): *foo*
(X)
CL-USER(3): (defparameter *bar* (declaim (type integer x)))
*BAR*
CL-USER(4): *bar*
(X)
In other cases, e.g. `(values)` which is an expression that returns no values, the value is nil
Now, there are some statements in CL as far as I remember - I believe (declaim x integer) is a kind of statement, at least in the sense above.
But you can write a CL program that doesn't use a single statement.