       map
       (let [arg  (first args)
             args (rest args)]
-       (cond
-         (nil?  arg) (recur args map)
-         (map?  arg) (recur args (merge map arg))
-         (coll? arg) (recur (into args (reverse arg)) map)
-         :else       (recur (rest args) (assoc map arg (first args))))))))
+       (condp #(%1 %2) arg
+         nil?  (recur args map)
+         map?  (recur args (merge map arg))
+         coll? (recur (into args (reverse arg)) map)
+         (recur (rest args) (assoc map arg (first args))))))))
 
 (defn position
-  "Returns a map from item to the position of its first occurance in coll."
+  "Returns a map from item to the position of its first occurence in coll."
   [coll]
   (into {} (reverse (map-indexed #(vector %2 %1) coll))))
 


(defmacro defm [name & fdecl]
  "Define a function with memoization. Takes the same arguments as defn."
  `(let [var (defn ~name ~@fdecl)]
     (alter-var-root var (fn [f#] (with-meta (memoize f#) (meta f#))))
     var))

(defmacro cond-let
  "An implementation of cond-let that is as similar as possible to if-let. Takes multiple

  [f]
  (.addShutdownHook
   (Runtime/getRuntime)
   (Thread. f)))

(defn- parse-opt [default opts arg]
  (let [m re-matches, key (comp keyword str)]
