This chapter covers the printed representations of FSet collections, and two slightly different sets of reader macros that allow collection expressions to be written in a similar notation in your source code.
This table summarizes the printed representations of the persistent FSet types.
| type | printed form | notes |
| wb-set | #{ e0 e1 … }[compare-fn] | 1, 3 |
| ch-set | ##{ e0 e1 … }[compare-fn] | 2, 3 |
| complement-set | ~set | 4 |
| wb-map | #{| (k0 v0) (k1 v1)
… |}[key-compare-fn;val-compare-fn]/default | 1, 5, 6 |
| ch-map | ##{| (k0 v0) (k1 v1)
… |}[key-compare-fn;val-compare-fn]/default | 2, 5, 6 |
| wb-bag | #{% e0 #%(e1 m1) … %}[compare-fn] | 1, 3 |
| ch-bag | ##{% e0 #%(e1 m1) … %}[compare-fn] | 2, 3 |
| wb-seq | #[ e0 e1 … ]/default | 6, 7 |
| ch-replay-set | ##{= e0 e1 … }[compare-fn] | 2, 3 |
| ch-replay-map | ##{=| (k0 v0) (k1 v1)
… |}[key-compare-fn;val-compare-fn]/default | 2, 5, 6 |
| ch-2-relation | ##{+ (k0 v0) (k1 v1)
… +}[key-compare-fn;val-compare-fn] | 2, 5 |
| wb-2-relation | #{+ (k0 v0) (k1 v1)
… +}[key-compare-fn;val-compare-fn] | 1, 5 |
| dyn-tuple | #~< (k0 v0) (k1 v1) … > |
Notes:
# indicates WB.
# indicates CHAMP.
compare.
compare. If both of them are
compare, the brackets are also omitted.
nil; if the
collection has no default, /[no default] is printed.
#,
possibly also suffixed with a slash and default, or /[no default]. Within a non-char seq,
runs of consecutive characters are printed as #$ followed by the characters as a string.