title: Compact way in Clojure to print a variable number of command line arguments?
body: <p>I'm a newbie to Clojure.  I think I'm trying to solve this procedurally and there must be a better (more functional) way to do this in Clojure...</p>
  <p>The -main function can receive a variable number of 'args'. I would like to print them out but avoid an IndexOutOfBoundsException.  I thought I could mimic Java and use a case fall-through to minimize the code involved, but that didn't work:</p>
  <pre><code>(defn -main [&amp; args]
    (println &quot;There are&quot; (str (count args)) &quot;input arguments.&quot;)
    (println &quot;Here are args:&quot; (str args))
    (let [x (count args)]
      (case x
        (&gt; x 0) (do
            (print &quot;Here is the first arg: &quot;)
            (println (nth args 0)))
        (&gt; x 1) (do
            (print &quot;Here is the 2nd arg: &quot;)
            (println (nth args 1)))
        (&gt; x 2) (do
            (print &quot;Here is the 3rd arg: &quot;)
            (println (nth args 2))))))
  </code></pre>