Given an array contains elements such as:
[":test" ":do_this" "dont" ":_another_one"]
I need to remove the : and replace it with a empty string which can be done using:
(clojure.string/replace element #":" "")
However how can I apply this to every element? I have looked at using the apply function but it doesn't seem to modify the elements, is this because they are in fact immutable?
(apply function collection)
Is what I've been looking at doing but no luck so far.
applyandmapfunctions (as a supplement to the correct answer by Lee),applywill start as a call like this:(apply f [1 2 3])and do this:(f 1 2 3), evaluating the function once by giving it all the elements of the list as arguments, resulting in a single output value;map, OTOH, will start as this:(map f [1 2 3])and do this((f 1) (f 2) (f 3)), where the function will be applied to each element of the original list, resulting in a new list.