[Tests] Test samples from KEEP
This commit is contained in:
committed by
TeamCityServer
parent
b0a7be72e8
commit
d8faa9686d
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun List<Int>.decimateEveryEvenThird() = sequence {
|
||||
var counter = 1
|
||||
for (e in this@List) {
|
||||
if (e % 2 == 0 && counter % 3 == 0) {
|
||||
yield(e)
|
||||
}
|
||||
counter += 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user