99re热这里只有精品视频,7777色鬼xxxx欧美色妇,国产成人精品一区二三区在线观看,内射爽无广熟女亚洲,精品人妻av一区二区三区

Clojure Maps contains

2018-09-28 14:56 更新
查看映射是否包含必需的鍵。

語(yǔ)法

以下是語(yǔ)法。

(contains hmap key)

參數(shù) - 'hmap'是哈希鍵和值的映射。‘key’是需要在映射中搜索的鍵。

返回值 - 如果鍵存在,則返回true,否則返回false。

例子

以下是Clojure中contains的例子。

(ns clojure.examples.example
   (:gen-class))
(defn example []
   (def demokeys (hash-map "z" "1" "b" "2" "a" "3"))
   (println (contains? demokeys "b"))
   (println (contains? demokeys "x")))
(example)

輸出

上述代碼輸出以下結(jié)果。

true
false


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)