Permalink
Browse files

Extract dimension from item before substracting from limits

  • Loading branch information...
tsu committed Mar 3, 2011
1 parent d9b987a commit e83844a4d76c598b02988fd6647b4ea4bf5d70b8
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/lol/server.clj
View
@@ -15,7 +15,7 @@
(defn substract-from-limits
[limits item]
- (map (fn [pair] (- (first pair) (last pair))) (map list limits item)))
+ (map (fn [pair] (- (first pair) (last pair))) (map list limits (dimensions-of-item item))))
(defn fill-knapsack
[items limits knapsack]

0 comments on commit e83844a

Please sign in to comment.