Handbook
Glossary
non-repeating ( seq -- seq' )
Vocabulary
sets
.
extras
Inputs
seq
an
object
Outputs
seq'
an
object
Definition
USING:
kernel
sequences
sequences.extras
sets
;
IN:
sets.extras
::
non-repeating
( seq -- seq' )
HS{
}
clone
:>
visited 0 seq
new-resizable
:>
accum seq
[
accum
over
visited
?adjoin
[
push
]
[
remove-first!
drop
]
if
]
each
accum seq
like
;