I have
(def data {:headers ["A" "B" "C" "D"]
:rows [["1" "2" "3" "4"] ["5" "6" "7" "8"] ["9" "10" "11"
"12"]]})
And I have a function
(defn replace-value [struct]
(clojure.walk/prewalk-replace {"3" "hello"} (struct :rows)))
When I do
(replace-value @data) > [["1" "2" "hello
swap! takes as its arguments the atom and the function to transition the
state inside the atom. It implicitly calls the function on the state:
(swap! data replace-value)
It also can accept trailing arguments too...
https://www.conj.io/store/v1/org.clojure/clojure/1.8.0/clj/clojure.core/swap%2
Hi Herwig,
I would like some help on how to use namespaces. I'm using
the org.clojure/data.xml "0.1.0-beta3" and am a bit confused and can't find
any good examples.
My namespaced xml message has elements where the :tag is an
javax.xml.namespace.QName object. Up to now I have been just handlin
Hi,
I have a project which uses some java project. I made classes using
gen-class. Than in unit test just wanted to test it (clojure.test enviro).
If I run tests in emacs+cider they works. If I run test in the command line
I have class not found exception:
boot testing aot run-test
task testing
It doesn't look like data is actually an atom? Maybe that's just an error
in your e-mail...
On Tue, Dec 20, 2016 at 8:24 AM Ghadi Shayban wrote:
> swap! takes as its arguments the atom and the function to transition the
> state inside the atom. It implicitly calls the function on the state:
> (
Hi Francis,
first off: if you can afford it, I'd recommend working with the 0.2.0
series, as the 0.1.0 namespace api is legacy.
In the 0.2.0 series, the mapping of keyword prefix to xmlns is unique and
fixed, so names are always parsed as keywords (though QName instances still
are permitted for e