Namespace:

// Slow implementation that shows the semantics.
...
I do not know if this solution would be much faster. But if I should make a statement, I would tend to yes.

(The point of my code was to show the semantics as much clearly as possible, it was not to show fast code.)

If no similar function is in Phobos, and there is no trivial way to implement it efficiently, then maybe it's worth writing a Phobos enhancement request.

Bye,
bearophile

Reply via email to