View Problem

Check if a key exists in a map

Given a map pets {joe:cat,mary:turtle,bill:canary} print "ok" if an pet exists for "mary"
DiskEdit
clojure
(if (contains? '{joe cat mary turtle bill canary} 'mary)
(println "ok"))

Submit a new solution for clojure
There are 27 other solutions in additional languages (cpp, erlang, fantom, fsharp ...)