aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscgilardi <scgilardi@gmail.com>2008-06-29 02:04:13 +0000
committerscgilardi <scgilardi@gmail.com>2008-06-29 02:04:13 +0000
commite8184143755a9dfa7c37f248e89754931fb7df20 (patch)
tree24a63324c8b777c7489245d425d74133277d8671
parent172d47d9378300bd040d1957047918b979d5fdbe (diff)
pred.clj: add empty?
-rw-r--r--pred.clj5
1 files changed, 5 insertions, 0 deletions
diff --git a/pred.clj b/pred.clj
index 6518db2b..99e2b715 100644
--- a/pred.clj
+++ b/pred.clj
@@ -101,3 +101,8 @@
"Returns true if x is odd, throws an exception if x is not an integer"
[x]
(not (even? x)))
+
+(defn empty?
+ "Returns true if coll is empty"
+ [coll]
+ (not (seq coll)))