Fold1IncrementAsLength.yqls 351 B

123456789101112131415
  1. (
  2. (let config (DataSource 'config))
  3. (let list (AsList (String 'a) (String 'b) (String 'c)))
  4. (let data (Fold1 list
  5. (lambda '(item) (Uint32 '1))
  6. (lambda '(item state) (+ state (Uint32 '1)))))
  7. (let res_sink (DataSink 'result))
  8. (let world (Write! world res_sink
  9. (Key)
  10. data '('('type))))
  11. (let world (Commit! world res_sink))
  12. (return world)
  13. )