我觉得必须有一个更清洁的方法来做到这一点,但我没有看到它.
(defn map-rest "Passes through the first item in coll intact. Maps the rest with f." [f coll] (concat (list (first coll)) (map f (rest coll))))
clojure
clojure ×1