 
 (extend-protocol Identifiable
 
+  nil
+  (identify [_] nil)
+
   multihash.core.Multihash
-  (identify [x] x)
+  (identify [m] m)
 
   blocks.data.Block
-  (identify [x] (:id x))
+  (identify [b] (:id b))
 
   merkledag.link.MerkleLink
-  (identify [x] (:target x)))
+  (identify [l] (:target l)))
 
 
 (defprotocol NodeStore


(defn delete-node!
  [store id]
  (-delete-node! store (identify id)))


(defrecord MemoryNodeStore


(defn get-links
  [store id]
  (when-let [id (identify id)]
    (some->
      (-get-node store id)
      (:links)
