title: Non-blocking input in lisp
body: <p>I have program that runs for long periods of time and I'd like to interrupt it but not with ctrl-c ctrl-c. I also don't want the system to wait for a keystroke every so often. Instead, if I do press a key, I want it to wrap things up and exit. I found <code>listen</code> and <code>read-char-no-hang</code> but I can't get it to work right. Here's what I tried to do</p>
  
  <pre><code>(let ((f nil))
    (loop while (not f) do
       (if (listen)
         (setf f t)))))
  </code></pre>
  
  <p>Obviously, this is doing less than a sloth on Xanax as far as finding key=-presses. What am I doing wrong?</p>