"on" is a nice way to avoid repetition
Compose sum with weight rather than dropping down to foldl
Decoupling the knapsack algorithm from the Item type.