knapsack in ocaml