                       (remove nil?))]
     (if (some #{:all} referred)
       :all
-      (if (empty? referred)
-        nil
+      (when (seq referred)
         (-> referred concat flatten distinct)))))
 
 (defn- get-flags [libspecs]


(defn- create-libspec-vectors-without-prefix
  [libspecs]
  (-> (for [libspec libspecs]
        (create-libspec (update-in libspec [:ns] #(-> % suffix symbol))))
      vec))

(defn- create-libspec-vectors-with-prefix
  [libspecs]
  (-> (for [libspec libspecs]
        (create-libspec libspec))
      vec))

(defn- create-prefixed-libspec-vector
  [libspecs]
  (-> (for [{:keys [ns] :as libspec} libspecs]
        (create-libspec (assoc libspec :ns (ns-suffix ns))))
      vec))

(defn- create-prefixed-libspec-vectors
  [[libspec & more :as libspecs]]
  (if-not more
    (create-libspec-vectors-with-prefix [libspec])
    [(into [(ns-prefix (-> libspecs first))]
           (create-libspec-vectors-without-prefix libspecs))]))

(defn- create-libspec-vectors

                         classes-by-prefix
                         create-import-components
                         sort-imports)]
    (when (seq import-form)
      (cons :import import-form))))

(defn- drop-index [col idx]
