【发布时间】:2021-11-15 21:49:14
【问题描述】:
我想查找我的字符串列表中的任何字符串中是否有子字符串。我有一个类似 '("hi" "hey" "hello") 的列表。使用“some”我可以找到值“hi”是否在此列表中。但是我怎么能找到“h”是否在列表中的至少一个字符串中?
【问题讨论】:
-
如何使用
some检查"hi"是否在列表中? -
类似这样的东西,我猜
(some #(clojure.string/includes? % "h") ["hi" "hello" "hey"]) -
请参阅此文档列表,尤其是。 Clojure 备忘单:github.com/io-tupelo/clj-template#documentation
标签: clojure clojurescript