Make `pr` a bit nicer behaving
author |
Steve Losh <steve@stevelosh.com> |
date |
Wed, 14 Sep 2016 13:15:24 +0000 |
parents |
e7bd00f6516f
|
children |
4ce0e524240d
|
branches/tags |
(none) |
files |
losh.lisp |
Changes
--- a/losh.lisp Tue Aug 23 17:40:11 2016 +0000
+++ b/losh.lisp Wed Sep 14 13:15:24 2016 +0000
@@ -1170,12 +1170,15 @@
(defun pr (&rest args)
"Print `args` readably, separated by spaces and followed by a newline.
+ Returns the first argument, so you can just wrap it around a form without
+ interfering with the rest of the program.
+
This is what `print` should have been.
"
(format t "~{~S~^ ~}~%" args)
(finish-output)
- (values))
+ (first args))
(defun bits (n size &optional (stream t))
"Print the bits of the `size`-bit two's complement integer `n` to `stream`.