ConstMapThenFold.yqls 370 B

123456789101112
  1. (
  2. #comment
  3. (let config (DataSource 'config))
  4. (let res_sink (DataSink 'result))
  5. (let list1 (AsList (String 'a) (String 'b) (String 'c)))
  6. (let map (Map list1 (lambda '(x) (Uint32 '1))))
  7. (let data (Fold map (Uint32 '0) (lambda '(item state) (+ item state))))
  8. (let world (Write! world res_sink (Key) data '('('type))))
  9. (let world (Commit! world res_sink))
  10. (return world)
  11. )