I came across the following issue when doing problem user=> (let [f '(+ 1 1)] (apply (first f) (rest f))) 1
I could use eval but eval is bad (apparently)... Investigating this further I can see that : user=> (let [f '(+ 1 1)] (type (first f))) clojure.lang.Symbol wheras : user=> (type +) clojure.core$_PLUS_ It would seem that I still need to call eval on the '+ at least, in order to resolve it to a function, but eval is still bad (apparently). I could create a map of symbol to function and I can see that others have done the same, but this seems a bit verbose because clojure will do that for me with eval. If the map is the correct approach then why is it any better than eval? What is the correct thing to do here? Im sure this is revealing some fundamental misunderstanding that I have... :o/ -- 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.