I have variable test in Clojure like this:
( def test '([:circle {:cx 428, :cy 245, :r 32.2490309931942, :fill red}] [circle] [:line {:x1 461, :y1 222, :x2 365, :y2 163}] [:line {:x1 407, :y1 102, :x2 377, :y2 211}] [line]))
I want to remove the [line] and [circle] objects from it and for it to look like this:
([:circle {:cx 428, :cy 245, :r 32.2490309931942, :fill red}] [:line {:x1 461, :y1 222, :x2 365, :y2 163}] [:line {:x1 407, :y1 102, :x2 377, :y2 211}] )
Is there an easy way to do this in Clojure?
I've looked at this thread How can I remove an item from a sequence in Clojure?
and remove() but I still don't have it. that thread shows:
(remove #{:foo} #{:foo :bar}) ; => (:bar)
(remove #{:foo} [:foo :bar]) ; => (:bar)
(remove #{:foo} (list :foo :bar)) ; => (:bar)
but for me I have something more like:
(remove #????? ([:foo :bar] [foo] [bar]))
and I want to end up with ([:foo :bar]) only.