Lloyd Dupont: > I did the following, what do you think of my implementation? Those for loops seem better as foreach ones, or even reverse foreach ones. Probably in std.algorithm there is stuff to shorten your code. Bye, bearophile