(defonce car (atom "")) (defn car-colour [ ] [:div [:div.container [:div.span12 [car-form car]]] [:div.container [:div.span12 "The car colour is: " @car]] ])
I have this function where you type in the make of a car and then this goes to a database and returns the colour of the car. Is there a way of getting the value of @car to use in another function? For example, to put the make of car and colour into a table. When I try to use @car in my table function it doesn't work. Also is there a way to save these values in the table so if I called the car-colour function on another make it would add that to the table as well -- 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.