Skip to content

Instantly share code, notes, and snippets.

@Beyamor
Created May 24, 2014 20:36
Show Gist options
  • Save Beyamor/7046c62112a5a27f31de to your computer and use it in GitHub Desktop.
Save Beyamor/7046c62112a5a27f31de to your computer and use it in GitHub Desktop.
; before
(fn [{:keys [memory registers] :as system}]
(let [value (memory/load memory
(registers :pc))]
(-> system
(->/in [:registers]
(assoc r value)
(update-in [:pc] inc)))))])
; after
(m/do value <- read-next-byte
(set-register r value))])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment