anchor.diff:                      (when *debug* (write :~))
                       ; Word endings
                       (when (and (not raw) (wordp trie))
  -                        (write-char #\•)
  +                        (write-char #\u2022)    ; Bullet
                           (return))
                       (pprint-newline :mandatory) ; THIS makes the newline after leaf!
                       (pprint-indent :current 0)
  
positive.code: ;     (wrap-recursion (#'recurse-trie trie seq)
  ;         (unless symbol
  ;             (setf symbol (add-key trie (elt seq 0))))
  ;         (incf (trie-width symbol))))
  
negative.code: ;;; -*- Mode: Lisp -*-
  ;;; 
  ;;; P-TRIE - probability trie (with branch widths)
  ;;; 
  ;;; Author:
  ;;;     Peter Hillerström
  ;;; Version:
  ;;;     0.1
  ;;; Initial Comon Lisp version:
  ;;;     2010-08-01
  ;;; 
  ;;; Features:
  ;;;     This trie implementation has an original idea of “branch width”
  ;;;     invented by Peter Hillerström on 14 of November 2008.
  ;;;     Branch width of a trie node tells how many branches go through that node.
  ;;;     Widths can be used to calculate probabilites for different suffixes.
  ;;; 
  ;;; Notes about this implementation:
  ;;;     * P-trie is implemented recursively, so ‘trie’ can mean the whole tree 
  ;;;       or a single node on a trie.
  ;;;     * Keys can be sequences of any type.
  ;;;     * IMPORTANT: All functions are destructive, for efficiently handling 
  ;;;       large data sets. There will be non-destructive versions of functions.
  ;;; 
  ;;; About tries generally:
  ;;;     Trie, or prefix tree, is an ordered tree data structure that is used to store 
  ;;;     an associative array where the keys are usually strings. Unlike a binary search 
  ;;;     tree, no node in the tree stores the whole key associated with that node; 
  ;;;     instead, its position in the tree shows what key it is associated with.
  ;;;     
  ;;;     All the descendants of a node have a common prefix of the string associated 
  ;;;     with that node, and the root is associated with the empty string.
  ;;;     Looking up a key of length m takes worst case O(m) time.
  ;;;     
  ;;;     More information about tries:
  ;;;     http://en.wikipedia.org/wiki/Trie
  
  (defpackage :ptrie
      (:export
          ; Predicates
          :branchesp :leafp :wordp
          
          ;; Init and slots
          :make-trie :trie-key :trie-width :trie-branches
          
          ;; Insert, retrieve and remove (CRUD) operations
          :add-seq :add-seqs
          :find-key :find-seq
          
          ;; Printing
          :pprint-trie :print-words
          
          ;; Extras
          :trie-prob :test-trie
          )
      (:use :cl))
  
  (in-package :ptrie)
  
  (defparameter *print-pretty* t)
  (defparameter *print-circle* t)
  (defparameter *debug* nil)
  
  ;;; Initialization
  ;;;
  ;;; With struct, trie nodes occupy (without contents):
  ;;; Struct:             8 bits for each slot (24 bits)
  ;;; (with contents:     + 16 bits for 1-char key = 40 bits)
  ;;;
  ;;; Alternative implementation could use lists, arrays or objects:
  ;;; Linked cons cells:  3 * cons (8 bits) = 24 bits
  ;;; Class:              16 for class, 20 for vector = 36 bits
  
  (defstruct (trie (:type list))
      "Trie data structure, see package documentation for more info."
      (key "" :read-only t)       ; Generic type -- could be :type char
      (width 0 :type integer)
      (branches nil :type list))  ; Could a vector for optimization, but complicates things!
  
  (defun test-trie ()
      "Simple utility function to build a test trie."
      (let ((r (make-trie)))
          (add-seqs r (mapcar #'(lambda (s) (string-downcase (string s)))
                              '(blow boa blush foo bar baz)))
          (pprint-trie t r)
          r))
  
  
  ;;; Predicates
  
  (defun wordp (trie)
      (find-key trie t))
  
  (defun branchesp (trie)
      ; TODO account for (t 1 nil) nodes for word endings
      (car (trie-branches trie)))
  
  (defun leafp (trie)
      (not (branchesp trie)))
  
  
  ;;; Retrieval
  
  (defun find-seq (trie seq)
      "Find a sequence from trie"
  