We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2bc4f6 commit 2282babCopy full SHA for 2282bab
src/main/java/collections/Collections.kt
@@ -14,15 +14,15 @@ inline fun <T> Iterable<T>.onEach(operation: (T) -> Unit): Iterable<T> {
14
}
15
16
inline fun <T, R> Iterable<T>.flatMap(transformation: (T) -> Iterable<R>): List<R> {
17
- val list = arrayListOf<R>()
+ val list = ArrayList<R>()
18
for (elem in this) {
19
list.addAll(transformation(elem))
20
21
return list
22
23
24
inline fun <T> Iterable<T>.filter(predicate: (T) -> Boolean): List<T> {
25
- val list = arrayListOf<T>()
+ val list = ArrayList<T>()
26
27
if (predicate(elem)) {
28
list.add(elem)
0 commit comments