diff options
| author | s-ol <s+removethis@s-ol.nu> | 2025-03-18 11:47:22 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-18 12:06:18 +0000 |
| commit | b6cbc69461dc054019f50f8971704f6ef9de63ab (patch) | |
| tree | d2b8942b780f668ccbe57b52dd8d65f61613e935 /alv/builtins.moon | |
| parent | builtins: switch takes single array as value (diff) | |
| download | alive-wip.tar.gz alive-wip.zip | |
language: [array] and {struct} literalswip
Diffstat (limited to 'alv/builtins.moon')
| -rw-r--r-- | alv/builtins.moon | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/alv/builtins.moon b/alv/builtins.moon index d76effc..0d188f9 100644 --- a/alv/builtins.moon +++ b/alv/builtins.moon @@ -539,11 +539,11 @@ In case of collisions, the event that comes first in the argument list wins." @out\set input! return -array = Constant.meta +mkarray = Constant.meta meta: - name: 'array' + name: 'mkarray' summary: "Construct an array." - examples: { '(array a b c…)' } + examples: { '[a b c…]', '(mkarray a b c…)' } description: "Produces an array of values. `a`, `b`, `c`… have to be values of the same type. @@ -559,11 +559,11 @@ This is a pure op, so at most one !-stream input is allowed." args = @unwrap_all! @out\set args -struct = Constant.meta +mkstruct = Constant.meta meta: - name: 'struct' + name: 'mkstruct' summary: "Construct an struct." - examples: { '(struct key1 val1 [key2 val2…])' } + examples: { '{key1 val1 [key2 val2…]}', '(mkstruct key1 val1 [key2 val2…])' } description: "Produces a struct of values. `key1`, `key2`, … have to be constant expressions. @@ -732,7 +732,7 @@ Constant.meta '->': thread_first '->>': thread_last - :array, :struct + :mkarray, :mkstruct :loop, :recur |
