(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