LMap.yqls 416 B

1234567891011121314151617181920
  1. (
  2. #comment
  3. (let config (DataSource 'config))
  4. (let res_sink (DataSink 'result))
  5. (let list (AsList
  6. '((Uint32 '1) (String 'a))
  7. '((Uint32 '2) (String 'b))
  8. '((Uint32 '1) (String 'c))))
  9. (let handler (lambda '(stream) (block '(
  10. (return (Map stream (lambda '(x) (Nth x '1))))
  11. ))))
  12. (let data (LMap list handler))
  13. (let world (Write! world res_sink (Key) data '()))
  14. (let world (Commit! world res_sink))
  15. (return world)
  16. )