aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Optimizers/ConstMapThenFold.yqls
blob: 06d8d1ee2e98c38294f5f0a03da7f9063731a89a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
(
#comment
(let config (DataSource 'config))
(let world (Configure! world config 'PureDataSource 'yt))

(let res_sink (DataSink 'result))
(let list1 (AsList (String 'a) (String 'b) (String 'c)))
(let map (Map list1 (lambda '(x) (Uint32 '1))))
(let data (Fold map (Uint32 '0) (lambda '(item state) (+ item state))))
(let world (Write! world res_sink (Key) data '('('type))))
(let world (Commit! world res_sink))
(return world)
)