shekibobo/knapsacker — pull request #1 by shekibobo (2014-08-25 04:54:42+00:00)
Title: Allow working with more than just available-dolls [broken]

For all I can tell, this should work, but it doesn't.

```
$ lein spec
...FFFF

Failures:

1) optimal dolls optimizes the dolls by value

java.lang.NullPointerException
... 2 stack levels elided ...
at knapsacker.core$optimal_knapsack.invoke(core.clj:64)
at knapsacker.core$optimal_set.invoke(core.clj:88)
at knapsacker.core_spec$eval1482$fn__1483$fn__1488.invoke(/Users/joshuakovach/clojure/knapsacker/spec/knapsacker/core_spec.clj:18)
... 33 stack levels elided ...
at user$eval882.invoke(form-init2779918463844253377.clj:1)
... 14 stack levels elided ...

2) optimal dolls value returns the maximum value of dolls that can fit in the knapsack

java.lang.NullPointerException
... 2 stack levels elided ...
at knapsacker.core$optimal_knapsack.invoke(core.clj:64)
at knapsacker.core$optimal_value.invoke(core.clj:83)
at knapsacker.core_spec$eval1532$fn__1533$fn__1538.invoke(/Users/joshuakovach/clojure/knapsacker/spec/knapsacker/core_spec.clj:23)
... 33 stack levels elided ...
at user$eval882.invoke(form-init2779918463844253377.clj:1)
... 14 stack levels elided ...

3) optimal boxes optimizes the boxes by value

java.lang.NullPointerException
... 2 stack levels elided ...
at knapsacker.core$optimal_knapsack.invoke(core.clj:64)
at knapsacker.core$optimal_set.invoke(core.clj:88)
at knapsacker.core_spec$eval1582$fn__1583$fn__1588.invoke(/Users/joshuakovach/clojure/knapsacker/spec/knapsacker/core_spec.clj:28)
... 33 stack levels elided ...
at user$eval882.invoke(form-init2779918463844253377.clj:1)
... 14 stack levels elided ...

4) optimal boxes value returns the maximum value of boxes that can fit in the knapsack

java.lang.NullPointerException
... 2 stack levels elided ...
at knapsacker.core$optimal_knapsack.invoke(core.clj:64)
at knapsacker.core$optimal_value.invoke(core.clj:83)
at knapsacker.core_spec$eval1632$fn__1633$fn__1638.invoke(/Users/joshuakovach/clojure/knapsacker/spec/knapsacker/core_spec.clj:33)
... 33 stack levels elided ...
at user$eval882.invoke(form-init2779918463844253377.clj:1)
... 14 stack levels elided ...

Finished in 0.01871 seconds
7 examples, 4 failures
Subprocess failed
```