Dynamic chain for ranges?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon Jun 13 13:44:11 UTC 2022
On Monday, 13 June 2022 at 13:22:52 UTC, Steven Schveighoffer
wrote:
> I would think sort(joiner([arr1, arr2, arr3])) should work, but
> it's not a random access range.
Yes, I got the error «must satisfy the following constraint:
isRandomAccessRange!Range`».
It would be relatively easy to make it work as a random access
range if arr1, arr2, etc were fixed size slices.
Or I guess, use insertion-sort followed by merge-sort.
More information about the Digitalmars-d-learn
mailing list