]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/rosetta-code/knapsack/knapsack.factor
core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota...
[factor.git] / extra / rosetta-code / knapsack / knapsack.factor
index 4f989c29380a2f4a0315d57aad9714eb0554d79b..a33034459965aeb1e2cf2f05f67fc560c99e98b9 100644 (file)
@@ -72,13 +72,13 @@ CONSTANT: limit 400
     ] each ;
 
 : fill-table ( table -- )
-    [ items length iota ] dip
+    [ items length <iota> ] dip
     '[ _ iterate ] each ;
 
 :: extract-packed-items ( table -- items )
     [
         limit :> weight!
-        items length iota <reversed> [| item-no |
+        items length <iota> <reversed> [| item-no |
             item-no table nth :> prev
             item-no 1 + table nth :> curr
             weight [ curr nth ] [ prev nth ] bi =