12345678910111213141516171819202122232425262728293031323334353637383940 |
- (
- #comment
- (let config (DataSource 'config))
- (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)
- )
|