aboutsummaryrefslogtreecommitdiffstats
path: root/alv-lib/string.moon
blob: 37810a4501ecf47ca9edf495df6e5ccfc48c54c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import PureOp, Constant, Input, T, sig, evt from require 'alv.base'

any = sig! / evt!

str = Constant.meta
  meta:
    name: 'str'
    summary: "Concatenate/stringify values."
    examples: { '(.. v1 [v2…])', '(str v1 [v2…])' }
  value: class extends PureOp
    pattern: any\rep 1, nil
    type: T.str
    tick: => @out\set table.concat [tostring i! for i in *@inputs]

{
  :str, '..': str
}