Reputation: 553
What should the function look like? I would like create PageKeyDataSourceFactory.
class PageKeyDataSourceFactory(
private var request: suspend (offset: Int) -> MutableList<Any>
)
Upvotes: 1
Views: 38
Reputation: 2365
The function can be a suspend function. It must accept an Int
as parameter and return a MutableList<Any>
var request: suspend (Int) -> ArrayList<Any>
= { offset: Int -> arrayListOf<Any>() }
Upvotes: 1