Created
October 29, 2019 04:13
-
-
Save lgaff/95d08dab5278fdfbfc54711b6bfbece5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn ram [start length & {:keys [paged-in bank tag] | |
:or {paged-in false | |
bank 0}}] | |
;; I want to check here if :tag was added or not. But also i don't want to because style | |
(make-memory start length paged-in bank :text (vec (replicate length 0)) :writable true)) | |
(defn- make-memory [start length paged-in bank & {:keys [text writable tag]}] | |
;; TODO: Maybe check that length and end - start are the same; fill with zeros if not. | |
{:start start | |
:end (+ start length) | |
:bank bank | |
:writable writable | |
:text text | |
:paged-in false} | |
; :tag would go here if it were passed. Or not elsewise. | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.