(defn f
  ([a b c] ...)
  ([a b c d]
    (if d
        ...
        (f a b c))))

Not the prettiest solution, I'll grant you; I'm sure someone will come
along with something better. But this will work.

On Sep 27, 11:13 am, Glen Rubin <rubing...@gmail.com> wrote:
> I have a function that will accept 3 or 4 parameters.  Another
> function I have calls it and passes in 4 arguments.  Sometimes, the
> 4th argument is nil and this causes an error, instead of just calling
> the main function as if I passed in 3 arguments.  Meaning the main
> function sees a 4th parameter with nil value.  How do I get it to act
> as only 3 parameters were passed in this circumstance?  thx

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to