返回Map中的键列表。
以下是语法。
(keys hmap)
参数 - " hmap"是哈希键和值的映射。
链接:https://www.learnfk.comhttps://www.learnfk.com/clojure/clojure-maps-keys.html
来源:LearnFk无涯教程网
返回值 - 返回Map中的键列表。
(ns clojure.examples.example (:gen-class)) (defn example [] (def demokeys (hash-map "z" "1" "b" "2" "a" "3")) (println (keys demokeys))) (example)
上面的代码产生以下输出。
(z a b)
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)
Python实战 · 从0到1搭建直播视频平台 -〔Barry〕