Don't pre-expand programs passed to interpreter

This commit is contained in:
Lee Spector 2021-07-26 15:40:33 -04:00
parent 2572c706a8
commit 461da8c939
2 changed files with 3 additions and 1 deletions

2
.gitignore vendored
View File

@ -21,6 +21,8 @@ notes
/.idea/
/results
/temp
*~
q
# Don't commit the data directory that we'll
# use to hold the data from

View File

@ -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))