anchor.diff:    (when (<= i (# stack))
       (let* [(elem (nth stack i))
              (hash (.. (.> elem :source) "|" (.> elem :linedefined)))
  +           (previous (and fold (.> history hash)))
              (child (.> parent hash))]
  +
  +      ;; If we've this function in our history already, we'll push to that.
  +      (when previous
  +        (.<! parent :n (- (.> parent :n) 1))
  +        (set! child previous))
  +
         (unless child
           (set! child elem)
           (.<! elem :n 0)
           (.<! parent hash child))
   
  -      (build-rev-stack child stack (+ i 1)))))
  +      ;; If we've no previous, we push this one to the lookup and pop it again afterwards
  +      (unless previous (.<! history hash child))
  +      (build-rev-stack child stack (+ i 1) history fold)
  +      (unless previous (.<! history hash nil)))))
  +
   
   (defun finish-stack (element)
     "This converts the lookup of ELEMENT into a sorted list with
  
positive.code: 
      stats))
  
  (defun build-stack (parent stack i)
    "Fold a STACK trace into PARENT, looking at the element I.
  
     This folds from the bottom of the stack, merging upwards, resulting in a normal
     flame graph."
    :hidden
    ;; Increment the number of times hit
    (.<! parent :n (+ (.> parent :n) 1))
  
negative.code:     (with (folded (const-struct :n 0 :name "<root>"))
        (for-each stack stacks
          (if (= (.> args :stack-kind) "reverse")
            (build-rev-stack folded stack 1 (empty-struct) (.> args :stack-fold))
            (build-stack folded stack (# stack) (empty-struct) (.> args :stack-fold))))
  
        (finish-stack folded)
  
        (if (= (.> args :stack-show) "flame")
          (show-flame! mappings folded "" (or (.> args :stack-limit) 30))
          (with (writer (w/create))
            (show-stack! writer mappings (# stacks) folded (or (.> args :stack-limit) 10))
            (print! (w/->string writer)))))))
  