On Thu, Feb 26, 2009 at 06:45:27PM +0000, Ross Paterson wrote: > Yes, bucketing problems like this are a common case that the standard > functions cannot handle. Perhaps the libraries need a canned solution. Stratch that -- as Bulat points out, accumArray is such a canned solution.