StreamFlatMap.yqls 965 B

1234567891011121314151617181920
  1. (
  2. #comment
  3. (let config (DataSource 'config))
  4. (let res_sink (DataSink 'result))
  5. (let list (AsList (Int32 '1) (Int32 '2) (Int32 '3)))
  6. (let world (Write! world res_sink (Key) (Collect (FlatMap (Iterator list (DependsOn (String 'A)))
  7. (lambda '(x) (AsList x x)))) '('('type))))
  8. (let add (lambda '(y) (+ y (Int32 '10))))
  9. (let world (Write! world res_sink (Key) (Collect (FlatMap (Iterator list (DependsOn (String 'B)))
  10. (lambda '(x) (Map (/ (Int32 '5) (- (Int32 '2) x)) add)))) '('('type))))
  11. (let world (Write! world res_sink (Key) (Collect (FlatMap (Iterator list (DependsOn (String 'C)))
  12. (lambda '(x) (Iterator (AsList x x))))) '('('type))))
  13. (let world (Write! world res_sink (Key) (Collect (FlatMap list
  14. (lambda '(x) (Iterator (AsList x x))))) '('('type))))
  15. (let world (Write! world res_sink (Key) (Collect (FlatMap (/ (Int32 '3) (Int32 '1))
  16. (lambda '(x) (Iterator (AsList x x))))) '('('type))))
  17. (let world (Commit! world res_sink))
  18. (return world)
  19. )