summaryrefslogtreecommitdiff
path: root/src/eval/array.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/array.rs')
-rw-r--r--src/eval/array.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eval/array.rs b/src/eval/array.rs
index 3006c91f..8dcbd5a9 100644
--- a/src/eval/array.rs
+++ b/src/eval/array.rs
@@ -41,6 +41,11 @@ impl Array {
Self(vec)
}
+ /// Return `true` if the length is 0.
+ pub fn is_empty(&self) -> bool {
+ self.0.len() == 0
+ }
+
/// The length of the array.
pub fn len(&self) -> i64 {
self.0.len() as i64