7.7
4.7 Sets
(require rebellion/collection/set) | package: rebellion |
value
The empty immutable set.
procedure
(empty-set? v) → boolean?
v : any/c
A predicate for empty immutable sets. Implies set?.
procedure
(nonempty-set? v) → boolean?
v : any/c
A predicate for nonempty immutable sets. Implies set?.
procedure
(mutable-set? v) → boolean?
v : any/c
A predicate for mutable sets. Equivalent to set-mutable?.
value
value
Reducers
that collect elements of the reduced sequence into either an
immutable set or a mutable set, respectively.
Example:
> (transduce (list "the" "quick" "brown" "fox") (mapping immutable-string-length) #:into into-set) (set 5 3)