[英]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.