title: In Clojure, how to write a factory with variable number of arguments
body: <p>I would like to create a factory, in <code>clojure</code> where the number of arguments to the creator varies at run time.</p>
  
  <p>For example:</p>
  
  <pre><code>(defn create-long-document [direction]
    (str "long document " direction))
  
  (defn create-short-document[]
    "short document")
  
  (def creator-map {
   :english create-short-document
   :hebrew  create-long-document
  })
  (def additional-arg-map {
   :english nil
   :hebrew "rtl"
  })
  
   (defn create-document [language]
    (let [creator (language creator-map) arg (language additional-arg-map)]
      (if arg (creator arg) (creator))))
  
  
  (println (create-document :hebrew)); long document rtl
  (println (create-document :english)); short document
  </code></pre>
  
  <p>I am looking for an <strong>elegant</strong> way to rewrite the body of <code>create-document</code>. I want to get rid of the <code>if</code>. Maybe by introducing a smart macro? </p>
  
  <p>Please share you ideas.</p>