/simple-simulator

let's simulate machines in clojure!

Primary LanguageClojure

simple-simulator

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