Getting the underlying range from std.range.indexed, with elements in swapped order, when Indexed.source.length == Indexed.indices.length

Uknown sireeshkodali1 at gmail.com
Wed Jun 27 15:07:57 UTC 2018


On Wednesday, 27 June 2018 at 14:50:25 UTC, Alex wrote:
> On Wednesday, 27 June 2018 at 14:29:33 UTC, Uknown wrote:
>> On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote:
>>> On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote:
>>>> [...]
>
> I see. Ok, one possibility is
>
> source = indexed(source, indices).array;
>
> but I assume you want something without extra allocation, right?

This doesn't work for some reason.

"123".byCodeUnit.permutations.array.writeln //[123, 123, 123, 
123, 123, 123]


More information about the Digitalmars-d-learn mailing list