aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-02-10 17:51:24 +0000
committers-ol <s-ol@users.noreply.github.com>2020-02-10 17:51:24 +0000
commit6c18ffdcc493bce6bfec4f5e64453ec7d6140253 (patch)
treebd3f3fe647a8ad66d7c77c918174a464389a70f3 /lib/string.moon
parentclosures (diff)
downloadalive-6c18ffdcc493bce6bfec4f5e64453ec7d6140253.tar.gz
alive-6c18ffdcc493bce6bfec4f5e64453ec7d6140253.zip
add doc, import, import*, defn
Diffstat (limited to 'lib/string.moon')
-rw-r--r--lib/string.moon18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/string.moon b/lib/string.moon
new file mode 100644
index 0000000..82e9702
--- /dev/null
+++ b/lib/string.moon
@@ -0,0 +1,18 @@
+import Op from require 'core'
+
+class str extends Op
+ @doc: "(str v1 [v2]...)
+(.. v1 [v2]...) - concatenate/stringify values"
+
+ setup: (...) =>
+ @children = { ... }
+
+ update: (dt) =>
+ for child in *@children
+ child\update dt
+
+ @value = table.concat [tostring child\get! for child in *@children]
+
+{
+ :str, '..': str
+}