jan.rabe
12/25/2016, 4:47 PMfun <T> cloneWhenGreater(list: List<T>, threshold: T): List<T>
where T : Comparable<T>,
T : Cloneable {
return list.filter { it > threshold }.map { it.clone() }
}
fails because of required List<T>
but found List<Any>