A few range questions
Gary Willoughby via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jan 5 11:17:54 PST 2016
On Tuesday, 5 January 2016 at 18:47:30 UTC, Charles Smith wrote:
> 1. `arr[].sort` is changing arr in place. Any way to not do
> that?
Use this instead:
auto result = sort(arr[].dup);
.dup duplicates the array and sort(...) uses the std.algorithm
sort and not the built-in array sort method.
> 2. I noticed that result within `countingSort` is an array of
> arrays. I thought `chain` would concat them... did I miss
> something obvious?
No idea yet.
More information about the Digitalmars-d-learn
mailing list