Conditional structures: Difference between revisions

→‎condp: the test expression is used first in the call to the predicate
(→‎{{header|Clojure}}: formatting, reordering)
(→‎condp: the test expression is used first in the call to the predicate)
Line 303:
Similar to cond, but useful when each test differs by only one variant.
<lang clojure>(condp < 3
4 :a ; cond equivalent would be (< 3 4 3) :a
3 :b
2 :c
Anonymous user