feat: add isEmpty method to Sequence class with efficient early-termination check

This commit is contained in:
Bob Nystrom
2015-06-30 13:52:29 +00:00
parent d04e6a61a6
commit 1dc1c4e2bf
4 changed files with 21 additions and 0 deletions
+7
View File
@@ -61,6 +61,13 @@ Iterates over the sequence, passing each element to the given `function`.
:::dart
["one", "two", "three"].each {|word| IO.print(word) }
### **isEmpty**
Returns whether the sequence contains any elements.
This can be more efficient that `count == 0` because this does not iterate over
the entire sequence.
### **join**(sep)
Returns a string representation of the sequence. The string representations of