Handbook
Glossary
group-subsystems ( seq -- seq' )
Vocabulary
format-using
Inputs
seq
an
object
Outputs
seq'
an
object
Definition
USING:
arrays
kernel
make
math
sequences
;
IN:
format-using
:
group-subsystems
( seq -- seq' )
subsystem-clusters
[
[
costs
]
keep
3array
]
map
[
{
0 0
f
}
[
dup
cluster?
[
[
,
]
bi@
{
0 0
f
}
]
[
2dup
sum-too-long?
[
swap
,
]
[
cost+
]
if
]
if
]
reduce
,
]
{
}
make
[
first
zero?
]
reject
split-long-subsystems
[
last
" "
join
indent
prepend
]
map
;