aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string.moon
blob: 6a9b7d741418a49a0b05ea0778e43a84a0047013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import Stream, Op from require 'core'

class str extends Op
  @doc: "(str v1 [v2]...)
(.. v1 [v2]...) - concatenate/stringify values"

  setup: (...) =>
    @children = { ... }
    @out = Stream 'str'
    @out

  update: (dt) =>
    @out\set table.concat [tostring child\unwrap! for child in *@children]

{
  :str, '..': str
}