title: finding the character frequency in common lisp
body: <p>For example if i enter sequence of characters </p>
  
  <p>"Hello world" H = 1 e = 1 l = 3 o - 2 r = 1  w = 1 d = 1 </p>
  
  <p>can some one help me </p>
  
  <p>I found this <a href="http://rosettacode.org/wiki/Letter_frequency#Common_Lisp" rel="nofollow">code</a> online but i dont understand it i want a simpler one </p>
  
  <pre><code>(defun letter-freq (file)
   (with-open-file (stream file)
    (let ((str (make-string (file-length stream)))
          (arr (make-array 256 :element-type 'integer :initial-element 0)))
      (read-sequence str stream)
      (loop for c across str do (incf (aref arr (char-code c))))
      (loop for c from 32 to 126 for i from 1 do
        (format t "~c: ~d~a"
          (code-char c) (aref arr c)
          (if (zerop (rem i 8)) #\newline #\tab))))))
  
  (letter-freq "test.lisp")
  </code></pre>