about summary refs log tree commit diff stats
path: root/061text.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-11-15 16:39:15 -0800
committerKartik K. Agaram <vc@akkartik.com>2017-11-15 16:39:15 -0800
commita0f7723236dd8fb81953c976c07d58c35f346d75 (patch)
tree48f4fa78eac5b41357f574e854724763767aa63f /061text.mu
parent1193171f64f6b65d3ec714aa2d1d22b4e1d05832 (diff)
downloadmu-a0f7723236dd8fb81953c976c07d58c35f346d75.tar.gz
4121
Diffstat (limited to '061text.mu')
-rw-r--r--061text.mu8
1 files changed, 8 insertions, 0 deletions
diff --git a/061text.mu b/061text.mu
index e5fd8cc0..29529c12 100644
--- a/061text.mu
+++ b/061text.mu
@@ -355,6 +355,14 @@ def buffer-to-array in:&:buffer:_elem -> result:&:@:_elem [
   }
 ]
 
+def blank? x:&:@:_elem -> result:bool [
+  local-scope
+  load-ingredients
+  return-unless x, 1/true
+  len:num <- length *x
+  result <- equal len, 0
+]
+
 # Append any number of texts together.
 # A later layer also translates calls to this to implicitly call to-text, so
 # append to string becomes effectively dynamically typed.