[PRL] Accumulator for container capacity

Felix S Klock pnkfelix at ccs.neu.edu
Thu Sep 22 13:37:02 EDT 2005


On Sep 22, 2005, at 1:19 PM, Karl Lieberherr wrote:

> So which of the two solutions is preferred: Mitch's without the double 
> fold or Matthias' solution with !.
>  
> I vote for Matthias solution although I conjecture I will be overruled.

Well, one advantage of the functional solution is that it lends itself 
to (fairly trivial) parallelization, I believe.

That is, replace the Mitch's call to (map weight-and-violations-of-item 
(Container-contents ac)) with a call to a parallel-map procedure which 
spawns off a thread for each function call.

And of course there's the question of which solution is easier to prove 
correct.  I'd probably vote to Mitch's on that front as well.

-Felix

----
"Just think how many thoughts a blanket smothers
while one lies alone in bed, and how many unhappy dreams
it keeps warm."  -F. Kafka




More information about the PRL mailing list