blob: 6fd4b3f3cd87a6d9a71783331b9570247e355b71 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
(
#comment
(let res_sink (DataSink 'result))
(let config (DataSource 'config))
(let world (Configure! world config 'PureDataSource 'yt))
(let varTuple (VariantType (TupleType (DataType 'String) (DataType 'Bool) (DataType 'Uint32))))
(let varList (AsList
(Variant (String 'a1) '0 varTuple)
(Variant (Uint32 '3) '2 varTuple)
(Variant (String 'a2) '0 varTuple)
(Variant (Bool 'false) '1 varTuple)
(Variant (Uint32 '1) '2 varTuple)
(Variant (String 'a3) '0 varTuple)
(Variant (Uint32 '2) '2 varTuple)
(Variant (Bool 'true) '1 varTuple)
(Variant (Uint32 '4) '2 varTuple)
))
(let data (Demux varList))
(let world (Write! world res_sink (Key) data '('('type))))
(let varStruct (VariantType (StructType '('s (DataType 'String)) '('b (DataType 'Bool)) '('u (DataType 'Uint32)))))
(let varList (AsList
(Variant (String 'a1) 's varStruct)
(Variant (Uint32 '3) 'u varStruct)
(Variant (String 'a2) 's varStruct)
(Variant (Bool 'false) 'b varStruct)
(Variant (Uint32 '1) 'u varStruct)
(Variant (String 'a3) 's varStruct)
(Variant (Uint32 '2) 'u varStruct)
(Variant (Bool 'true) 'b varStruct)
(Variant (Uint32 '4) 'u varStruct)
))
(let data (Demux varList))
(let world (Write! world res_sink (Key) data '('('type))))
(let world (Commit! world res_sink))
(return world)
)
|