Simple machine simulator: a complement to this essay.
clj
(require 'machine-simulator)
(in-ns 'machine-simulator)
(get-in
(run
{'n 5 'counter 1 'res 1}
{'* * '> > '+ +}
factorial-instructions)
[:registry-map 'res])
Simple machine simulator: a complement to this essay.
clj
(require 'machine-simulator)
(in-ns 'machine-simulator)
(get-in
(run
{'n 5 'counter 1 'res 1}
{'* * '> > '+ +}
factorial-instructions)
[:registry-map 'res])