我有一個關於兩個功能,一個走一個完整的地圖和其他特定的關鍵字,像這樣一個問題:Clojure的自毀圖來分析關鍵參數
(def mapVal
{:test "n"
:anotherKey "n"})
(defn functionTest
[& {:keys [test anotherKey] :or {:test "d" :anotherKey "d"}}]
(println :test :anotherKey))
(defn mapFunc
[map]
(functionTest (get-in map [:test :anotherKey])))
的目標將是在參數所有的鍵map將被正確地傳遞給functionTest。無論如何,這可以工作?我嘗試了一些東西,但我不能獲得傳遞給functionTest的所有關鍵字和值。我不想要的只是地圖的值,它應該通過關鍵字和值傳遞給其他函數。