2008/12/23 Johan Berntsson <johan.may...@gmail.com>: > > Or simply quote the list > user=> (doseq [word '("one" "two" "three")] (println word)) > > On Dec 22, 8:34 am, Stuart Sierra <the.stuart.sie...@gmail.com> wrote: >> On Dec 22, 11:10 am, Piotr 'Qertoip' Włodarek <qert......@gmail.com> >> wrote: >> >> > user=> (doseq [word ("one" "two" "three")] (println word)) >> >> The problem here is that the list ("one" "two" "three") tries to >> evaluate "one" as a function. Try this: >> >> user=> (doseq [word (list "one" "two" "three")] (println word)) >> one >> two >> three >> nil >>
Or better yet, just use a vector, please. It's more idiomatic Clojure (doseq [word ["one" "two" "three"]] (println word)) Quoted lists are an ugly part of Lisps that can be avoided in Clojure. I don't see a lot of use for them other than in macros and other code-producing code. Rich --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---