(defn duplicate [x]
  (flatten (map #(repeat 2 %) x)))