reduceRight extension functions for
List<T>, the items are obtained through
This means that the total time for
LinkedList<T> and other linked lists will be O(n^2).
listIterator() instead would improve the situation for linked lists, but my tests show that it slightly slows down the execution for random access lists.
Is it intentional that linked lists performance is completely neglected in these operations?
Should linked lists be avoided generally when working with stdlib?