list slices are not random-access ranges, thus they can't be sorted in-place (this is what std.algorithm.sort does). so the only way is to convert list to array, sort it, and make a list from sorted array. probably not something you want. ;-)

this is common for any "traditional" linked list implementation: random access is very costly, thus even if it is implemented, it's better to not use it. SList and DList are "traditional" lists without any fancy algorithms inside (like finger trees or skip lists).

you may want to use arrays instead (it is often more efficient anyway, especially if you don't need to insert elements in the middle of the array), or associative arrays.

Reply via email to