blob: a76f48333046a49f03693e87645781ed521d428c (
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
|
(
#comment
(let config (DataSource 'config))
(let world (Configure! world config 'PureDataSource 'yt))
(let res_sink (DataSink 'result))
(let list (AsList
'('((Just (Uint32 '1)) (String 'a)) (String 'eee))
'('((Just (Uint32 '2)) (String 'b)) (String 'fff))
'('((Just (Uint32 '1)) (String 'a)) (String 'ggg))
'('((Nothing (OptionalType (DataType 'Uint32))) (String 'd)) (String 'hhh))
))
(let macro (lambda '(world name flags) (block '(
(let dict (ToDict list (lambda '(x) (Nth x '0)) (lambda '(x) (Nth x '1)) flags))
(let world (Write! world res_sink (Key) (String name) '()))
(let world (Write! world res_sink (Key) dict '('('type))))
(let world (Write! world res_sink (Key) (Contains dict '((Just (Uint32 '1)) (String 'a))) '()))
(let world (Write! world res_sink (Key) (Contains dict '((Just (Uint32 '2)) (String 'b))) '()))
(let world (Write! world res_sink (Key) (Contains dict '((Just (Uint32 '1)) (String 'c))) '()))
(let world (Write! world res_sink (Key) (Contains dict '((Just (Uint32 '2)) (String 'a))) '()))
(let world (Write! world res_sink (Key) (Contains dict '((Nothing (OptionalType (DataType 'Uint32))) (String 'd))) '()))
(let world (Write! world res_sink (Key) (Lookup dict '((Just (Uint32 '1)) (String 'a))) '()))
(let world (Write! world res_sink (Key) (Lookup dict '((Just (Uint32 '2)) (String 'b))) '()))
(let world (Write! world res_sink (Key) (Lookup dict '((Just (Uint32 '1)) (String 'c))) '()))
(let world (Write! world res_sink (Key) (Lookup dict '((Just (Uint32 '2)) (String 'a))) '()))
(let world (Write! world res_sink (Key) (Lookup dict '((Nothing (OptionalType (DataType 'Uint32))) (String 'd))) '()))
(return world)
))))
(let world (Apply macro world 'Sorted/One '('Sorted 'One)))
(let world (Apply macro world 'Sorted/Many '('Sorted 'Many)))
(let world (Apply macro world 'Hashed/One '('Hashed 'One)))
(let world (Apply macro world 'Hashed/Many '('Hashed 'Many)))
(let world (Commit! world res_sink))
(return world)
)
|