anchor.diff:            (zerop (logand n (1- n))))
         n
         (ash 1 (integer-length n))))
  -   
  -(defun b+node (&key (min-keys 2))
  -  (declare (type b+node-size min-keys))
  -  (let* ((min-size (round-up-to-power-of-2 (+ 3 min-keys min-keys)))
  -         (node     (make-array min-size)))
  -    (setf (b+node-lo node) 2
  -          (b+node-hi node) 2)
  +
  +(defun round-n-items (n)
  +  (declare (type b+node-size n))
  +  (- (the b+node-size (round-up-to-power-of-2
  +                       (the b+node-size (+ 3 n))))
  +     3))
  +
  +(defun b+node (&key (n-items nil) (pad t) (leaf nil) (initial-contents nil))
  +  (declare (type (or null b+node-size) n-items)
  +           (type list initial-contents))
  +  ;; (lenth initial-contents) and n-items should be odd or zero
  +  (let* ((n-items   (the b+node-size (cond
  +                                       ((and n-items (plusp n-items))
  +                                        (logior 1 n-items))
  +                                       (initial-contents
  +                                        (logior 1 (length initial-contents)))
  +                                       (t 0))))
  +         (n-rounded (the b+node-size (if pad (round-n-items n-items) n-items)))
  +         (node      (make-array (+ 3 n-rounded))))
  +    (setf (b+node-tag node) (not leaf)
  +          (b+node-lo node) 4 ;; position of first key, if present. first child would be at 3.
  +          (b+node-hi node) (+ 3 n-items))
  +    (loop
  +       :for item :in initial-contents
  +       :for i :from 3 :below (+ 3 n-items)
  +       :do (setf (svref node i) item))
       node))
  +
  +(defun b+leaf (&key (n-items nil) (pad t) (leaf t) (initial-contents nil))
  +  (declare (type b+node-size n-items)
  +           (type list initial-contents))
  +  (b+node :n-items (and n-items (1+ n-items))
  +          :pad pad :leaf leaf
  +          :initial-contents (and initial-contents (cons nil initial-contents))))
   
   (defun b+node-find (node key)
     (declare (type b+node node)
  
positive.code: 
  (in-package :hyperluminal-mem-tree)
  
  (deftype b+node-size () '(integer 0 #.(ash most-positive-fixnum -1)))
  
  
  (deftype b+node () 'simple-vector)
  
  (declaim (inline b+node-ref b+node-lo b+node-hi
                   (setf b+node-ref) (setf b+node-lo) (setf b+node-hi)))
  
  (defun b+node-ref (node index)
    (declare (type b+node node)
  
negative.code:            (type b+node-size index))
    (setf (svref node index) value))
  
  (defun b+node-tag (node)
    (declare (type b+node node))
    (the (or (member t nil) b+node) (svref node 0)))
  (defun (setf b+node-tag) (value node)
    (declare (type b+node node)
             (type (or (member t nil) b+node) value))
    (setf (svref node 0) value))
  
  (defun b+node-lo (node)
    (declare (type b+node node))
    (the b+node-size (svref node 1)))
  (defun (setf b+node-lo) (value node)
    (declare (type b+node node)
             (b+node-size value))
    (setf (svref node 1) value))
  
  (defun b+node-hi (node)
    (declare (type b+node node))
    (the b+node-size (svref node 2)))
  (defun (setf b+node-hi) (value node)
    (declare (type b+node node)
             (b+node-size value))
    (setf (svref node 2) value))
  
  
  (defun round-up-to-power-of-2 (n)
  