(apply str (repeat 3 "code"))

should start you up :))

Iteration is implicit in Clojure, you
work on collections (maps, vectors, ...)
and you avoid explicit loop controls
most of the time at least for
"mundane" tasks.

You will get used to it, we all did and
no one wants to return to
java iterators now :)))

Luc P.


Sent from my iPod

On 2010-06-27, at 14:22, José Luis Romero <tangu...@gmail.com> wrote:

Hi! I am learning the core of clojure, and so far, I am loving it. But
I am not a lisp programmer (python, java, among others), but never
functional programming. I am practicing with codingbat.com, coding the
exercises on clojure. I am stuck with loops. I want to concatenate n
times a string. For example, given the parameters 3 and "code" the
output will be "codecodecode". How can I do a loop in order to get
this output.

I know that this is a very newb question, any help will be
appreciated.

-- 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 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