Handbook
Glossary
bounty
Vocabulary
rosetta-code
.
knapsack-unbounded
Definition
IN:
rosetta-code.knapsack-unbounded
TUPLE:
bounty
amounts value weight volume
;
Methods
USING:
accessors
kernel
math.order
rosetta-code.knapsack-unbounded
;
M::
bounty
<=>
( a b -- <=> )
a
valid-bounty?
[
b
valid-bounty?
[
a b
[
value>>
]
compare
]
[
+gt+
]
if
]
[
b
valid-bounty?
+lt+
+eq+
?
]
if
;