Write a function filterNonNullValues using inline functions and reified type parameters, which takes a list of objects, filters all the values that are non-null, and returns a list of values of the same type.
Inline functions and reified types in Kotlin
Filter for non-null
Report a typo
Write a program in Kotlin
// correct the code below
fun filterNonNullValues(list: List<Any?>): List<T> {
// and 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.