You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Positional access in LazyList is as fast as sequential, positional for-each (for (int i = 0; i < size; i++)) is as fast as iterator for-each (for (E e : list)), and thus this class should implement java.util.RandomAccess.
I use positional for-each with RandomAccess lists heavily, e. g. (Kotlin)
inlinefun <T, L> L.forEach(action: (T) ->Unit): Unit
where L:List<T>, L:RandomAccess {
for (i in0 until size) action(this[i])
}
The text was updated successfully, but these errors were encountered:
Positional access in LazyList is as fast as sequential, positional for-each (
for (int i = 0; i < size; i++)
) is as fast as iterator for-each (for (E e : list)
), and thus this class should implement java.util.RandomAccess.I use positional for-each with RandomAccess lists heavily, e. g. (Kotlin)
The text was updated successfully, but these errors were encountered: