I've never used it, but you would use amap instead of map in this situation, because it is a Java array.
http://clojuredocs.org/clojure_core/clojure.core/amap Ambrose On Mon, Jun 27, 2011 at 1:08 PM, Linus Ericsson < [email protected]> wrote: > Maybe > > (map #(.addItem tree (.toString (first %))) planets) > > where #(.addItem tree (.toString (first %))) should be replaced with the > correct java interop for inserting into the tree, and the % becomes one and > one of the items in the planets vector (that is regarded as a sequence) the > argument. > > /Linus > > > 2011/6/27 Antonio Recio <[email protected]> > >> How I can translate this in clojure? >> >> for (int i=0; i<planets.length; i++) { >> String planet = (String) (planets[i][0]); >> tree.addItem(planet); >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to [email protected] >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> [email protected] >> 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 [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected] > 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 [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
