Visit1.yqls 703 B

12345678910111213141516171819202122
  1. (
  2. #comment
  3. (let config (DataSource 'config))
  4. (let res_sink (DataSink 'result))
  5. (let vt (VariantType (TupleType (DataType 'Int32))))
  6. (let v1 (Variant (Int32 '34) '0 vt))
  7. (let handler (lambda '(x) (+ (Int32 '100) x)))
  8. (let world (Write! world res_sink (Key) (Visit v1 '0 handler) '('('type))))
  9. (let world (Write! world res_sink (Key) (Visit v1 '0 handler (Int32 '999)) '('('type))))
  10. (let vt (VariantType (StructType '('a (DataType 'Int32)))))
  11. (let v1 (Variant (Int32 '34) 'a vt))
  12. (let world (Write! world res_sink (Key) (Visit v1 'a handler) '('('type))))
  13. (let world (Write! world res_sink (Key) (Visit v1 'a handler (Int32 '999)) '('('type))))
  14. (let world (Commit! world res_sink))
  15. (return world)
  16. )