我觉得必须有一种更清洁的方法来做到这一点,但我看不到。
(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))))
我觉得必须有一种更清洁的方法来做到这一点,但我看不到。
(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))))