In java I can do something like this:
myList.add(myObj);
then remove it like this
myList.remove(myObj);
This works by using the equals
method and checking each element in myList
for equivalence.
In clojure I can do this:
(def myvec [myrecord])
but I can't remove myrecord
from myvec
using remove
like this:
(remove myrecord myvec)
because I get an error:
ClassCastException myproj.Task cannot be cast to clojure.lang.IFn clojure.core/complement/fn--4611 (core.clj:1392)
How can I remove records from vectors in a way similar to the java method?