Exercise about generics from Kotlin Education presentation
There is a presentation about generics on
Kotlin for Education At the end there is a exercise. I can’t figure out how to solve this by changing only ????.
open class A
class B : A()
class C : A() { fun consume(other: A): C = this }
fun funny(
source: Iterator,
target: MutableCollection,
base: ????,
how: ????
) {
var result: R = base
for (value in source) {
result =...