   (try
     (if (integer? n)
       n
-      (-> n read-string int)) 
+      (-> n read-string int))
     (catch Exception e defval)))
 
 (defn find-with-val [col k v]
-  (let [pred 
+  (let [pred
         (fn [obj]
           (= v (get obj k)))]
     (->> col

       (apply str)))

(defn with-base [base-url & paths]
  (clojure.string/join 
    "/" (cons-apply 
          (cons base-url paths)
          trim-trailing-slash
          trim-slash)))


(defn trim-leading-slash [s]
  (if (instance? String s)
    (apply
      str
      (if (= (first s) \/)
        (rest s)
        s))
