Merge pull request #29 from DuckNoodleSoup/master
Changed :output to :print
This commit is contained in:
commit
890c2de152
@ -71,9 +71,9 @@
|
|||||||
program
|
program
|
||||||
(assoc state/empty-state :input {:in1 (first input)
|
(assoc state/empty-state :input {:in1 (first input)
|
||||||
:in2 (last input)}
|
:in2 (last input)}
|
||||||
:output '(""))
|
:print '(""))
|
||||||
(:step-limit argmap))
|
(:step-limit argmap))
|
||||||
:output))
|
:print))
|
||||||
inputs)
|
inputs)
|
||||||
parsed-outputs (map (fn [output]
|
parsed-outputs (map (fn [output]
|
||||||
(try (read-string output)
|
(try (read-string output)
|
||||||
|
@ -75,9 +75,9 @@
|
|||||||
:in2 (get input 1)
|
:in2 (get input 1)
|
||||||
:in3 (get input 2)
|
:in3 (get input 2)
|
||||||
:in4 (get input 3)}
|
:in4 (get input 3)}
|
||||||
:output '(""))
|
:print '(""))
|
||||||
(:step-limit argmap))
|
(:step-limit argmap))
|
||||||
:output))
|
:print))
|
||||||
inputs)
|
inputs)
|
||||||
errors (map (fn [correct-output output]
|
errors (map (fn [correct-output output]
|
||||||
(let [parsed-output (try (read-string output)
|
(let [parsed-output (try (read-string output)
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
:print_newline
|
:print_newline
|
||||||
^{:stacks [:print]}
|
^{:stacks [:print]}
|
||||||
(fn [state]
|
(fn [state]
|
||||||
(let [current-output (state/peek-stack state :output)
|
(let [current-output (state/peek-stack state :print)
|
||||||
popped-state (state/pop-stack state :output)]
|
popped-state (state/pop-stack state :print)]
|
||||||
(state/push-to-stack popped-state :output (str current-output \newline)))))
|
(state/push-to-stack popped-state :print (str current-output \newline)))))
|
||||||
|
|
||||||
(def _print
|
(def _print
|
||||||
^{:stacks [:print]
|
^{:stacks [:print]
|
||||||
@ -46,10 +46,10 @@
|
|||||||
(char? top-item))
|
(char? top-item))
|
||||||
top-item
|
top-item
|
||||||
(pr-str top-item))
|
(pr-str top-item))
|
||||||
current-output (state/peek-stack state :output)
|
current-output (state/peek-stack state :print)
|
||||||
popped-state (state/pop-stack (state/pop-stack state stack) :output)]
|
popped-state (state/pop-stack (state/pop-stack state stack) :print)]
|
||||||
(state/push-to-stack popped-state
|
(state/push-to-stack popped-state
|
||||||
:output
|
:print
|
||||||
(str current-output top-item-str))))))
|
(str current-output top-item-str))))))
|
||||||
|
|
||||||
(generate-instructions
|
(generate-instructions
|
||||||
|
@ -7,8 +7,9 @@
|
|||||||
:exec '()
|
:exec '()
|
||||||
:float '()
|
:float '()
|
||||||
:input {}
|
:input {}
|
||||||
|
:output {}
|
||||||
:integer '()
|
:integer '()
|
||||||
:output '("")
|
:print '("")
|
||||||
:string '()
|
:string '()
|
||||||
:vector_boolean '()
|
:vector_boolean '()
|
||||||
:vector_float '()
|
:vector_float '()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user