dnspies:
efficiently, or is it better to avoid this sort of thing?
D arrays are dynamic on the right. So appending on their left is not efficient (also here you are not prepending, you are concatenating. Array concatenation creates a new array). In some cases you can append on the right many items and then use std.algorithm.reverse (don't forget the () if you use UFCS) to reverse them. In case of doubt write little benchmarks.
Bye, bearophile