I think you're calling `deref` on the collection before passing it in? What
it's saying is that `swap!` expects an atom and you handed it a vector. So
either pass in the atom, or return a updated collection by replacing the
call to `swap!` and the `doseq` with `(into collection selecteds)`
On Tue,
Thanks for the tips!
Em terça-feira, 3 de abril de 2018 20:39:25 UTC-3, Base escreveu:
>
> Swap requires an atom as an input.
>
> https://clojuredocs.org/clojure.core/swap!
>
> If you are trying to perform swap! on a collection that was just read from
> json/read-str then it is probably not an a
I was passing as a parameter with @ before... it worked when i passed just
the atom name. Thanks.
Em terça-feira, 3 de abril de 2018 20:36:58 UTC-3, André escreveu:
>
> collection probably isn’t an atom. Do you have a fully working snippet?
>
> On 04/03/2018 08:24 PM, Renata Soares wrote:
>
> Goo
Swap requires an atom as an input.
https://clojuredocs.org/clojure.core/swap!
If you are trying to perform swap! on a collection that was just read from
json/read-str then it is probably not an atom, and you would need to
convert it to an atom before doing this.
However, generally there are
|collection| probably isn’t an atom. Do you have a fully working snippet?
On 04/03/2018 08:24 PM, Renata Soares wrote:
> Good Night,
>
> I have this function:
>
> (defn treat-requests [key-request collection]
> (let [selecteds (filter #((keyword key-request) %) input)]
> (doseq [item selecteds]
>