Handbook
Glossary
(binpack) ( alist #bins -- bins )
Vocabulary
math
.
binpack
.
private
Inputs
alist
an
object
#bins
an
object
Outputs
bins
an
object
Definition
USING:
accessors
assocs
sequences
sorting
;
IN:
math.binpack.private
::
(binpack)
( alist #bins -- bins )
alist
sort-values
<reversed>
:>
items #bins
[
<bin>
]
replicate
:>
bins items
[
bins
smallest-bin
add-to-bin
]
assoc-each
bins
[
items>>
]
map
;