Write a function filterByType using inline functions and reified type parameters, which takes a list of objects and an object type and then returns a new list containing only the objects of that type.
Inline functions and reified types in Kotlin
Filter with inline functions
Report a typo
Write a program in Kotlin
/*?*/ filterByType(list: List<Any>): List<T> {
// make your code here
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.