Move lambdas outside of parentheses

This commit is contained in:
Moez Bhatti
2018-06-21 08:57:08 -04:00
parent 89b43adfab
commit 9b624d33d5
18 changed files with 96 additions and 96 deletions
@@ -35,10 +35,10 @@ fun Cursor.forEach(closeOnComplete: Boolean = true, method: (Cursor) -> Unit = {
}
fun <T> Cursor.map(map: (Cursor) -> T): List<T> {
return List(count, { position ->
return List(count) { position ->
moveToPosition(position)
map(this)
})
}
}
fun <T> Cursor.mapWhile(map: (Cursor) -> T, predicate: (T) -> Boolean): ArrayList<T> {