fastEach

inline fun <L : List<E>, RandomAccess, E> L.fastEach(func: (E) -> Unit)

no-alloc Iterable.forEach which utilizes RandomAccess to get the elements.

note: this method contains a simple check for ConcurrentModificationException. if concurrent modification is detected, it will not throw an exception and simply print FAST_WARN_CONCURRENT_MODIFICATION to the console. This method is not thread safe.

Since

1.2.0

See also