Skip to content

Commit be56ab8

Browse files
committed
[lazy] smarter ASeq and LazySeq isEmpty()
1 parent 2000a90 commit be56ab8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/jvm/clojure/lang/ASeq.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public int size(){
184184
}
185185

186186
public boolean isEmpty(){
187-
return count() == 0;
187+
return seq() == null;
188188
}
189189

190190
public boolean contains(Object o){

src/jvm/clojure/lang/LazySeq.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public int size() {
145145
}
146146

147147
public boolean isEmpty() {
148-
return count() == 0;
148+
return seq() == null;
149149
}
150150

151151
public boolean contains(Object o) {

0 commit comments

Comments
 (0)