I am calling
defvar in the middle of a function definition. And so far I've always seen its use, with
defparameter for global variable. Like
(defun consume-socket-reply (socket end-test-form) (do* ((line "" (read-line (usocket:socket-stream socket) nil)) (text "" (concatenate 'string text line))) ((funcall end-test-form) text))) (defun read-http-content (socket) (defvar line) (consume-socket-reply socket (lambda () (not line))))
Is there a better way to write what I am trying to do? That is: being able to pass the end-test-form to the final inner loop.