Hi,

I'm just stating to learn clojure, i made a first read of "clojure 
programming" to get the big picture, and i'm starting to play with the 
repl, trying to solve some katas. A lot of theses katas involves returning 
the count of loop iterations. Most of the time, i end up with this kind of 
functions:

(defn my-function [a b & [n]]
 (if cond
   (my-function new-a new-b (inc (or n 0))
   (or n defaut-value)
  )
)

What are the pros/cons of doing this? Are there any idiomatic ways of doing 
this.

Thank you

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to