title: Returning a List of Words from a File
body: <p>My next project is writing a hangman game. I figured it would help me brush up on strings and file I/O.</p>
  
  <p>Currently, i'm stuck on reading in a file of strings into a list. I'm trying to avoid global variables, so could someone point me in the right direction to make this (probably broken) code into a function that returns a list?</p>
  
  <pre><code>(defun read-word-list ()
    "Returns a list of words read in from a file."
    (let ((word-list (make-array 0 
                   :adjustable t
                   :fill-pointer 0)))
         (with-open-file (stream #p"wordlist.txt")
       (loop for line = (read-line stream)
          while line
            (push line word-list)))
         (select-target-word word-list)))))
  </code></pre>