cursor?.apply{
this.moveToFirst()
}
cursor?.use{
it.moveToFirst()
}
The only difference I see is between it and this, that is the same instance. But, is there any other difference?
use() can only be called with a Closeable receiver. After the block is executed, the Closeable resource is closed, which saves boilerplate.
You can see https://kotlinlang.org/docs/scope-functions.html for more information on all the scope functions. use() is essentially the same as let(), except with the addtional auto-closing feature.