diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-03-25 10:43:29 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-03-25 11:25:05 +0000 |
| commit | 7cb862f6f6079509dafd466fff83c719cb2fd89e (patch) | |
| tree | 843f92c4d4b2507e88a525b7c56c29d343958e5b /lib/string.moon | |
| parent | Value -> Value/Event/IO-Stream (diff) | |
| download | alive-7cb862f6f6079509dafd466fff83c719cb2fd89e.tar.gz alive-7cb862f6f6079509dafd466fff83c719cb2fd89e.zip | |
new core.base.match, update lib
Diffstat (limited to 'lib/string.moon')
| -rw-r--r-- | lib/string.moon | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/string.moon b/lib/string.moon index 8b48977..3f9b28b 100644 --- a/lib/string.moon +++ b/lib/string.moon @@ -1,15 +1,17 @@ -import Op, Value, Input from require 'core.base' +import Op, ValueStream, Input from require 'core.base' -str = Value.meta +str = ValueStream.meta meta: name: 'str' summary: "Concatenate/stringify values." examples: { '(.. v1 [v2…])', '(str v1 [v2…])' } value: class extends Op - new: => super 'str' + setup: (inputs) => + @out or= ValueStream 'string' + super [Input.hot v for v in *inputs] - setup: (inputs) => super [Input.value v for v in *inputs] - tick: => @out\set table.concat [tostring v! for v in *@inputs] + tick: => + @out\set table.concat [tostring v! for v in *@inputs] { :str, '..': str |
