 
 (defn add-parentheses-mutate 
   "Returns a version of the given individual with one pair of parentheses added
-somewhere. Not compatible with (currently 'experimental') tagged code macros."
+   somewhere. Not compatible with (currently 'experimental') tagged code macros."
   [ind max-points]
   (let [expression (:program ind) 
         new-program (let [expstr (str expression)

  [open-close-sequence]
  ;(println "balancing:" open-close-sequence)
  (-> open-close-sequence
    (left-balance :open :close)
    (reverse)
    (left-balance :close :open)
    (reverse)))

;(let [s '(:open 1 2 :open a b :open c :close :open :open d :close :close e :close :close)]
;  (println s)


(defn tag-branch-insertion-mutate 
  "Returns a version of the given individual with a tag-branch inserted at a random
   location. A tag-branch is a sequence of instructions that 1) produces a boolean
   value by performing a randomly chosen comparison of copies (not popped) of the top 
   two items of a randomly selected type, and 2) branches to one of two tags depending
   on the result. The type-instruction-pairs argument should be a sequence of pairs,
   in which the first element of each is a type and the second element is a Push instruction
   that performs a comparison of the type, as in [:integer 'integer_eq]."
  [ind max-points type-instruction-pairs tag-limit]
  (let [old-program (:program ind)
        tag-ref-instruction-1 (symbol (str "tagged_" (str (lrand-int tag-limit)))) 
