Is there a way to iterate over a List of reified t...
# announcements
n
Is there a way to iterate over a List of reified types?
d
Define "list" in this context
n
For example, a list that contains the results of calling this function:
Copy code
private inline fun <reified T> query(isSubmitted: Boolean): List<T> { 
    return realm.where<T>().equalTo("submitted", isSubmitted).find()
}
(This example is using realm.io Kotlin extensions)
d
There is nothing special about that list. You can iterate it like any other list.
reified
just means you can use
T
in a different way inside the
query
function
n
Then, could you take a look here? What am I doing wrong? https://kotlinlang.slack.com/archives/C0922A726/p1558629544184400