Handbook
Glossary
(topological-sort) ( seq unvisited key -- seq unvisited )
Vocabulary
digraphs
Inputs
seq
an
object
unvisited
an
object
key
an
object
Outputs
seq
an
object
unvisited
an
object
Definition
USING:
kernel
sequences
;
IN:
digraphs
:
(topological-sort)
( seq unvisited key -- seq unvisited )
2dup
unvisited?
[
[
visit-children
]
keep
2dup
visited
pick
push
]
[
drop
]
if
;