Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Clojure Programming/Examples/API Examples/Predicate functions

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

drop-while user=> (drop-while pos? [1 2 3 -1 -2 3 4]) (-1 -2 3 4) filter user=> (filter nil? [:a :b nil nil :a]) (nil nil) user=> (filter (fn[x](= x :b)) [:a :b nil nil :a]) (:b) not-any? user=> (not-any? neg? [1 2 3 4 5]) true user=> (not-any? neg? [1 2 3 -4 5]) false remove user=> (remove nil? [:a :b nil nil :a]) (:a :b :a) every? user=> (every? pos? [1 2 3 4]) true user=> (every? pos? [0 1 2 3]) false some user=> (some neg? [0 1 2 -3 4]) true user=> (some #{:gamma} [:professor :gamma]) :gamma