[英]Clojure Iterating over a list of hash maps
我從以下代碼中收到錯誤消息“不知道如何創建ISeq”。 誰能告訴我為什么這不是一個適當的順序?
(defn hash-map-list []
(map (fn [component]
{:name component})
'("Jim" "Bill" "Carrie")))
(first hash-map-list)
謝謝你的幫助
您只是忘了調用函數:)
(first (hash-map-list))
{:name "Jim"}
hash-map-list
是一個函數。 它不是哈希映射列表。 如果調用該函數,您的代碼將起作用。
(first (hash-map-list))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.