Add test methods and data for uncommon cases
Uncommon means mostly that aren't present in raw fir builder data
This commit is contained in:
committed by
Mikhail Glukhikh
parent
8047aa22a4
commit
aebe8c36f5
@@ -0,0 +1,10 @@
|
||||
fun <T> copyWhenGreater(list: List<T>, threshold: T): List<String>
|
||||
where T : CharSequence,
|
||||
T : Comparable<T> {
|
||||
return list.filter { it > threshold }.map { it.toString() }
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val list = listOf("1", "2", "3")
|
||||
val copy = copyWhenGreater(list, "2")
|
||||
}
|
||||
Reference in New Issue
Block a user