AccessDictOpt.yqls 1.1 KB

12345678910111213141516171819202122232425262728
  1. (
  2. #comment
  3. (let config (DataSource 'config))
  4. (let res_sink (DataSink 'result))
  5. (let t (ToDict (AsList '((String 'dkey1) (String 'dvalue1)) '((String 'dkey2) (String 'dvalue2)))
  6. (lambda '(x) (Nth x '0)) (lambda '(x) (Nth x '1)) '('Sorted 'One)
  7. ))
  8. (let jt (Just t))
  9. (let n (Nothing (TypeOf jt)))
  10. (let world (Write! world res_sink (Key) (Contains jt (String 'dkey1)) '('('type))))
  11. (let world (Write! world res_sink (Key) (Contains jt (String 'dkeyx)) '('('type))))
  12. (let world (Write! world res_sink (Key) (Contains n (String 'dkey1)) '('('type))))
  13. (let world (Write! world res_sink (Key) (Contains n (String 'dkeyx)) '('('type))))
  14. (let world (Write! world res_sink (Key) (Lookup jt (String 'dkey1)) '('('type))))
  15. (let world (Write! world res_sink (Key) (Lookup jt (String 'dkeyx)) '('('type))))
  16. (let world (Write! world res_sink (Key) (Lookup n (String 'dkey1)) '('('type))))
  17. (let world (Write! world res_sink (Key) (Lookup n (String 'dkeyx)) '('('type))))
  18. (let world (Write! world res_sink (Key) (DictItems jt) '('('type))))
  19. (let world (Write! world res_sink (Key) (DictItems n) '('('type))))
  20. (let world (Commit! world res_sink))
  21. (return world)
  22. )