I'm getting my feet wet with lisp and came across an (I think) unusual problem. I'd like to create very long lists; ie, something like (setf *mat* (make-list 1000000))
, but without having Nil
printed out a million times on the screen.
The best I came up with is...
(let () (setf *mat* (make-list 1000000)) (length *mat*))
(or some other short but useless function at the end of the closure)
...but I suspect there is a better solution to avoid these sesquipedalian printouts. Any input is appreciated. Btw, I'm using Clozure v1.10 under Windows 7.
Usually one would call
(values)
at the end.Common Lisp has a way to deal with long output at the printer level:
*print-length*
here is the variable which controls it.