The structure of my hash is
(def *document-hash* {"documentid" {:term-detail {"term1" tf1 ,"term2" tf2}})
I wan to find the tf. Right now I have this. Is there a better way to do this in clojure?
;; Find tf
(defn find-tf [documentid term-number]
(if (nil? *document-hash* documentid)
0
(if (nil? (((*document-hash* documentid) :term-detail) term-number))
0
(((*document-hash* documentid) :term-detail) term-number))))