I have been learning Common Lisp for a short while, using the SBCL 2.0.0 REPL on a Windows 10 machine. At one point in time I inputted the 2 following lines into a REPL:
(defvar var-string (print (* 5 10)))
(read-from-string (write-to-string var-string))
which yielded the following output:
50
2
Trying the following, on the other hand:
(defvar foo-string (print (* 5 10 (* 5 5) )))
(read-from-string (write-to-string foo-string))
yields this:
1250
4
In either case the first number outputted makes sense, but what is the reason for, and causal mechanism behind, the second number? Going by the above information, it seems to represent the complexity of the code being interpreted, but I am curious about how this is determined and why it is printed. I would also like to know how to repress its output, if possible, for prettier printing.