title: How to see docstrings and other symbol information in Common Lisp REPL?
body: <p>I'm completely new to CL, and I'd like to learn how to read documentation strings and get other help information from the REPL. Something like <code>help(symbol)</code> in Python, or <code>symbol?</code> in iPython, or <code>:t</code> and <code>:i</code> in Haskell's GHCi.</p>
  
  <p>So, given a symbol name, I'd like to be able to know:</p>
  
  <ul>
  <li>what kind of value it is bound to, if any (a function, a variable, none at all)</li>
  <li>if it is a function or a macro, then what are its positional arguments</li>
  <li>if it has a docstring, show it</li>
  <li>what package or file it is coming from or when it was defined</li>
  </ul>
  
  <p>I found there is <code>(documentation '_symbol_ '_type_)</code>, but it is not exactly what I need. I need to know the type of value the symbol is bound to (<code>'function</code>, <code>'variable</code>, <code>'compiler-macro</code>, etc.) before I can use <code>documentation</code>. Then it returns only the docstring, it may be missing or not sufficient to use the symbol.</p>
  
  <p>For example, in Lisp, the help for <code>mapcar</code> is not very useful (CLisp's REPL):</p>
  
  <pre><code>&gt; (documentation 'mapcar 'function)
  NIL
  </code></pre>
  
  <p>I'd like to be able to see something like this instead:</p>
  
  <pre><code>&gt;&gt;&gt; map?
  Type:       builtin_function_or_method
  Base Class: &lt;type 'builtin_function_or_method'&gt;
  String Form:    &lt;built-in function map&gt;
  Namespace:  Python builtin
  Docstring:
      map(function, sequence[, sequence, ...]) -&gt; list
  
      Return a list of the results of applying the function to the items of
      the argument sequence(s).  If more than one sequence is given, the
      function is called with an argument list consisting of the corresponding
      item of each sequence, substituting None for missing values when not all
      sequences have the same length.  If the function is None, return a list of
      the items of the sequence (or a list of tuples if more than one sequence).
  </code></pre>