 
 ; Adds a new element to the front of the finger tree
 (defmulti push-front (fn [a _] (class a)))
-(defmethod push-front nil [_ a]
+(defmethod push-front finger-tree-empty [_ a]
     (finger-tree-single. a))
 (defmethod push-front finger-tree-single [{r :v} a]
-    (finger-tree-deep. [a] (delay nil) [r]))
+    (finger-tree-deep. [a] (delay (finger-tree-empty.)) [r]))
 (defmethod push-front finger-tree-deep [{l :l m :m r :r} a]
     (if (<= (count l) 3)
         (finger-tree-deep. (cons a l) m r)

        (dorun (map (fn [x] (print-entry x (object-id node))) node))))

(defmulti print-finger-tree (fn [node parent-id] (class node)))
(defmethod print-finger-tree nil [_ parent-id] nil)
(defmethod print-finger-tree finger-tree-single [node parent-id]
    (do
        (println (object-id node) " [label=\"Single\n" (:v node) "\"]")


(defrecord node-2 [a b])
(defrecord node-3 [a b c])
(defrecord finger-tree-empty [])
(defrecord finger-tree-single [v])
(defrecord finger-tree-deep [l m r])

