anchor.diff:              (return-from find-seq nil)
               (find-seq symbol (subseq seq 1)))))
   
  +(defun find-key (trie key)
  +    "Return a symbol matching key from trie's branches."
  +    (find key (trie-branches trie) :test #'equal :key (lambda (n) (trie-key n))))
  +
  +
  +;;; Insertion
  +
  +(defun add-seqs (trie seqs)
  +    (mapcar #'(lambda (seq) (add-seq trie seq))
  +        seqs))
  +
  +(defun add-seq (trie seq &optional (count 1))
  +    "Add a branch to the trie count times. If branch already exists, increase it’s width.
  +    A count below one is changed to one. Modifies trie in-place."
  +    (when (< count 0) (error (format nil "Negative count ~A." count)))
  +    (incf (trie-width trie) count)
  +    (when (zerop (length seq))
  +        (add-key trie t count)
  +        (return-from add-seq trie))
  +    (let ((symbol (add-key trie (elt seq 0) 0)))
  +        ; (add-key trie (elt seq 0) count)
  +        (add-seq symbol (subseq seq 1) count)))
  +
  +(defun add-key (trie key &optional (count 1))
  +    "Add a node to trie. If node exists, increases it’s width."
  +    (when (< count 0) (error (format nil "Negative count ~A." count)))
  +    (let ((node (find-key trie key)))
  +        (if node
  +            (incf (trie-width node) count)
  +            (setq node (create-node trie key count)))
  +        node))
  +
  +(defun create-node (trie key &optional (count 0))
  +    "Destructively adds node to trie"
  +    (car (push (make-trie :key key :width count) (trie-branches trie))))
  +
  +
  +;;; Removal
  +
  +; (defun remove-key (trie key &optional (count 1))
  +;     "### Remove a node from trie. If node exists, decrease it’s width.
  +;     
  +;     1. Find if key exist.
  +;     2. Decrease it's width when is less than or equal to count.
  +;     3. If width is 0, remove node into new trie to be returned."
  +;     nil)
  +
  +; (defun remove-key-broken (trie key)
  +;     "###"
  +;     (let ((node (find-key trie key))
  +;           (branches (trie-branches trie)))
  +;         (when node
  +;             (decf (trie-width node)) ; FIXME
  +;             (when (<= 0 trie-width node)
  +;                 (setf branches (remove-if #'(lambda (x) (equal x key)) branches))))))
  +
  +
   ; (defun remove-seq (trie seq &optional (count 1))
  -;     "Remove a sequence from trie"
  +;     "### Remove a sequence from trie"
   ;     (unless (find-seq trie seq)
   ;         (return-from remove-seq nil))
   ;     (decf (trie-width trie) (max count 1))
  
positive.code: ;             (return-from remove-seq nil))
  ;         (remove-seq symbol (subseq seq 1) count)))
  
  (defun add-seq (trie seq &optional (count 1))
      "Add a branch to the trie count times. If branch already exists, increase it’s width.
      A count below one is changed to one. Modifies trie in-place."
      (when (< count 0) (error (format nil "Negative count ~A." count)))
      (incf (trie-width trie) count)
      (if (zerop (length seq))
          (progn (add-key trie t count)
                 (return-from add-seq trie)))
      (let ((symbol (add-key trie (elt seq 0) 0)))
          ; (add-key trie (elt seq 0) count)
          (add-seq symbol (subseq seq 1) count)))
  
  ; Node or symbol level
  
  (defun wordp (trie)
      (find-key trie t))
  
  (defun leafp (trie)
      (car (trie-branches trie)))
  
  (defun find-key (trie key)
      "Return a symbol matching key from trie's branches."
      (find key (trie-branches trie) :test #'equal :key (lambda (n) (trie-key n))))
  
  (defun add-key (trie key &optional (count 1))
      "Add a node to trie. If node exists, increases it’s width."
      (when (< count 0) (error (format nil "Negative count ~A." count)))
      (let ((node (find-key trie key)))
          (if node
              (incf (trie-width node) count)
              (setq node (create-node trie key count)))
          node))
  
  (defun create-node (trie key &optional (count 0))
      "Destructively adds node to trie"
      (car (push (make-trie :key key :width count) (trie-branches trie))))
  
  (defun remove-key (trie key &optional (count 1))
      "Add a node to trie. If node exists, increases it’s width.")
  
  (defun remove-key-broken (trie key)
      (let ((node (find-key trie key))
            (branches (trie-branches trie)))
          (when node
              (decf (trie-width node)) ; FIXME
              (when (<= 0 trie-width node)
                  (setf branches (remove-if #'(lambda (x) (equal x key)) branches))))))
  
  
  ;; Traversal & printing
  
  ; (defmethod print-object ((object trie) stream)
  ;     (when *print-pretty* (format stream "~&~v@T" 2))
  ;     (format stream "(~S ~d" (trie-key trie) (trie-width trie))
  ;     (when (leafp trie)
  ;         (loop as branch in (trie-branches trie) do
  ;             (print branch)))
  ;     (format stream ")"))
  
  (defun pprint-trie (*standard-output* trie &key (raw nil))
      (setf *print-miser-width* nil)  ; Miser mode disables pprint-indent!
      (pprint-logical-block (*standard-output* trie :prefix "(" :suffix ")")
          ; Print key
  
negative.code:                     (when *debug* (write :~))
                      ; Word endings
                      (when (and (not raw) (wordp trie))
                          (write-char #\u2022)    ; Bullet
                          (return))
                      (pprint-newline :mandatory) ; THIS makes the newline after leaf!
                      (pprint-indent :current 0)
  