NthOpt.yqls 626 B

123456789101112131415161718192021222324
  1. (
  2. #comment
  3. (let config (DataSource 'config))
  4. (let res_sink (DataSink 'result))
  5. (let t '(
  6. (String 'aaa)
  7. (Just (Uint32 '4))
  8. (Nothing (OptionalType (DataType 'Uint32)))
  9. ))
  10. (let jt (Just t))
  11. (let n (Nothing (TypeOf jt)))
  12. (let world (Write! world res_sink (Key) (Nth t '0) '()))
  13. (let world (Write! world res_sink (Key) (Nth jt '0) '()))
  14. (let world (Write! world res_sink (Key) (Nth jt '1) '()))
  15. (let world (Write! world res_sink (Key) (Nth jt '2) '()))
  16. (let world (Write! world res_sink (Key) (Nth n '0) '()))
  17. (let world (Write! world res_sink (Key) (Nth n '2) '()))
  18. (let world (Commit! world res_sink))
  19. (return world)
  20. )