Handbook
Glossary
set? ( object -- ? )
Factor handbook
»
The language
»
Collections
»
Sets
Prev:
set
Next:
Operations on sets
Vocabulary
sets
Inputs and outputs
object
an
object
?
a
boolean
Word description
Tests if the object is an instance of the
set
class.
Definition
USING:
bit-sets
classes.tuple.private
hash-sets
hash-sets.wrapped
kernel
linked-sets
sequences
slots.private
;
IN:
sets
:
set?
( object -- ? )
dup
dup
tuple?
[
layout-of
7
slot
dup
\
linked-set
eq?
[
drop
t
]
[
dup
\
wrapped-hash-set
eq?
[
drop
t
]
[
dup
\
bit-set
eq?
[
drop
t
]
[
\
hash-set
eq?
]
if
]
if
]
if
]
[
drop
f
]
if
[
drop
t
]
[
sequence?
]
if
;