On Monday, 24 August 2015 at 09:50:41 UTC, yawniek wrote:
On Friday, 21 August 2015 at 21:08:25 UTC, Laeeth Isharc wrote:
I guess this kind of thing will do:
upRangeHighs.each!((ref a)=>(++histogram[a][0]));
        

  int[] arr = [5,1,2,2,3,4,5,5,5];
  int[int] histo;
  arr.each!( a => ++histo[a]  );
  writeln(histo);

this works

Thanks v much for suggestions, everyone. In the end I just went with something like the above.

Reply via email to