Berkley DB CFFI-Bindings

Special Structures 

Unspecified structures 

(defstruct trie (value nil) (arcs nil))

Comparator 

(setf (symbol-function 'comp-<=) (complement #'comp->))
(setf (symbol-function 'comp->=) (complement #'comp-<))
(setf (symbol-function 'comp-/=) (complement #'comp-=))

Pipes 

Binary trees 

Heap structure 

(defstruct heap
  (array (make-array 5 :adjustable t))
  (size 0)
  (key-fn #'identity)
  (value-fn #'identity)
  (array-increment 3/4) 
  (comparator (number-comparator)))

Resource pools 

(defstruct pool
  (count 0)
  (store (make-queue))
  (add-strategie #'enqueue)
  (next-strategie (lambda (q)
		    (let ((data (front q)))
		      (dequeue q)
		      (values data
			      t)))))