If I have sequence
[1 1 1 1 3 2 4 1]
how can I remove a particular number from that sequence? For example
(remove [1 1 1 1 3 2 4 1] 1) -> [3 2 4]
You can use a set as a predicate to remove, because sets can be called as functions.
(remove #{1} [1 1 1 1 3 2 4 1])
=> (3 2 4)
wrap that in (vec ..) if you need the result to be a vector.
The bonus of that approach is that you could remove many arbitrary values by sticking them in the set. If it's just one, this of course works too:
(remove #(= 1 %) [1 1 1 1 3 2 4 1])