Change vector/_replacefirst

This changes `vector/_replacefirst` to just return the original vector if the value that will be replaced was not found. This change was made in order to be more consistent with Clojush.
This commit is contained in:
Erik Rauer 2021-01-07 14:23:41 -06:00
parent 5412ff6c90
commit beed85b5c0

View File

@ -185,7 +185,7 @@
(fn [lit1 lit2 vect]
(let [replaceindex (utils/indexof lit1 vect)]
(if (= replaceindex -1)
:ignore-instruction
vect
(assoc vect replaceindex lit2))))
[lit-stack lit-stack stack]
stack))))