utils.rkt: Add a label for the pretty printing section.

This commit is contained in:
Sergiu Ivanov 2020-12-23 14:51:34 +01:00
parent 6c764aff22
commit a74b944e2c
1 changed files with 5 additions and 0 deletions

View File

@ -285,6 +285,11 @@
(check-equal? (list-sets->list-strings (list (set 'x 'y) (set 'z) (set) (set 't)))
'("y x" "z" "" "t"))))
;;; ===============
;;; Pretty printing
;;; ===============
(: pretty-print-set (-> (Setof Any) String))
(define (pretty-print-set s)
(string-join (sort (set-map s any->string) string<?)))