SortOptTuple.yqls 565 B

1234567891011121314151617181920
  1. (
  2. #comment
  3. (let config (DataSource 'config))
  4. (let res_sink (DataSink 'result))
  5. (let list (AsList
  6. '((Just (Uint32 '2)) (Just (String 'D)))
  7. '((Nothing (OptionalType (DataType 'Uint32))) (Just (String 'E)))
  8. '((Just (Uint32 '3)) (Just (String 'A)))
  9. '((Just (Uint32 '3)) (Nothing (OptionalType (DataType 'String))))
  10. '((Just (Uint32 '2)) (Just (String 'B)))
  11. ))
  12. (let keyExtractor (lambda '(x) x))
  13. (let data (Sort list '((Bool 'false) (Bool 'false)) keyExtractor))
  14. (let world (Write! world res_sink (Key) data '()))
  15. (let world (Commit! world res_sink))
  16. (return world)
  17. )