From 461da8c9394caa1cc6db4d9e7eba9a94beec3998 Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Mon, 26 Jul 2021 15:40:33 -0400 Subject: [PATCH] Don't pre-expand programs passed to interpreter --- .gitignore | 2 ++ src/propeller/push/interpreter.cljc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b4976a2..96884b1 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ notes /.idea/ /results /temp +*~ +q # Don't commit the data directory that we'll # use to hold the data from diff --git a/src/propeller/push/interpreter.cljc b/src/propeller/push/interpreter.cljc index 0735c2e..9941146 100755 --- a/src/propeller/push/interpreter.cljc +++ b/src/propeller/push/interpreter.cljc @@ -42,7 +42,7 @@ the returned state will include the key :history with a value that is a vector containing all states prior to the final state." [program start-state step-limit] - (loop [state (assoc start-state :exec program :step 1) + (loop [state (assoc start-state :exec (list program) :step 1) history []] (if (or (empty? (:exec state)) (> (:step state) step-limit))