Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

Clojure Programming/Examples/API Examples/Predicate functions

From Wikibooks, open books for an open world
<Clojure Programming |Examples |API Examples

drop-while

[edit |edit source]
user=>(drop-whilepos?[123-1-234])(-1-234)

filter

[edit |edit source]
user=>(filternil?[:a:bnilnil:a])(nilnil)user=>(filter(fn[x](=x:b))[:a:bnilnil:a])(:b)

not-any?

[edit |edit source]
user=>(not-any?neg?[12345])trueuser=>(not-any?neg?[123-45])false

remove

[edit |edit source]
user=>(removenil?[:a:bnilnil:a])(:a:b:a)

every?

[edit |edit source]
user=>(every?pos?[1234])trueuser=>(every?pos?[0123])false

some

[edit |edit source]
user=>(someneg?[012-34])trueuser=>(some#{:gamma}[:professor:gamma]):gamma
Retrieved from "https://en.wikibooks.org/w/index.php?title=Clojure_Programming/Examples/API_Examples/Predicate_functions&oldid=3678370"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp