anchor.diff:  
   (function insertWithinLine (result lineNo idx insert)
     (replaceWithinLine result lineNo idx idx insert))
  -
  -(function insertLineAt (result lineNo line)
  -  (result.lines.splice lineNo 0 line))
   
   (function initLine (result line)
     (set result.x 0)
  
positive.code: 
        origText text            ;; [string] - original text
        origCursorX SENTINEL_NULL
        origLines                ;; [string array] - original lines
        (text.split LINE_ENDING_REGEX)
  
        lines []                 ;; [string array] - resulting lines (with corrected parens or indentation)
        lineNo -1                ;; [integer] - line number we are processing
        ch ""                    ;; [string] - character we are processing (can be changed to indicate a replacement)
        x 0                      ;; [integer] - x position of the current character (ch)
  
        parenStack []            ;; We track where we are in the Lisp tree by keeping a stack (array) of open-parens.
                                 ;; Stack elements are objects containing keys {ch, x, lineNo, indentDelta}
  
negative.code: 
    ;; auto-calculate cursorDx when pressedEnter is true
    (when result.pressedEnter
      (var prevCursorLine result.inputLines[result.cursorLine-1])
      (set result.cursorDx (- result.cursorX prevCursorLine.length)))
  
    result)
  