From beed85b5c0a2ca255e11fe75d5599940bf46e06a Mon Sep 17 00:00:00 2001 From: Erik Rauer Date: Thu, 7 Jan 2021 14:23:41 -0600 Subject: [PATCH] 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. --- src/propeller/push/instructions/vector.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/propeller/push/instructions/vector.cljc b/src/propeller/push/instructions/vector.cljc index 8785159..ccdc980 100755 --- a/src/propeller/push/instructions/vector.cljc +++ b/src/propeller/push/instructions/vector.cljc @@ -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))))