 
 
 (defn consume-top-of
-  "Takes an PushDSL blob, a stackname (keyword) and a scratch variable
-  (keyword) in which to store the top value from that stack.
-
-    Exceptions when:
-    - the stack doesn't exist
-    - the stack is empty"
+  "Takes an PushDSL blob, a stackname (keyword) and a scratch variable (keyword) in which to store the top value from that stack. Exceptions when: the stack doesn't exist, the stack is empty"
   [ [interpreter scratch] stackname & {:keys [as]}]
   (let [old-stack (u/get-stack interpreter stackname)
         old-args (:ARGS scratch)]



(defn delete-nth-of
  "Usage: `delete-nth-of [stackname :at where]`

  Removes item at index `where` from stack `stackname`. If `where` is
  an integer, the index deleted is `(mod where (count stackname))`; if
  it is a scratch reference, the numerical value is looked up. If the
  item stored under key `where` is not an integer, an error occurs.

  Exceptions when:
    - the stack doesn't exist
    - the stack is empty
    - no index is given
    - the index is a :keyword that doesn't point to an integer"
  [[interpreter scratch] stackname & {:keys [as at]}]
  (let [[idx old-stack]
          (get-nth-of [interpreter scratch] stackname :at at)]



(defn index-from-scratch-ref
  "Takes a keyword and a scratch hashmap. If an integer is stored under that key in the hashmap, it's returned. Otherwise raises an exception."
  [k locals]
  (let [stored (k locals)]
    (if (number? stored)
