[Tests] Test samples from KEEP

This commit is contained in:
Anastasiya Shadrina
2021-09-06 18:43:33 +07:00
committed by TeamCityServer
parent b0a7be72e8
commit d8faa9686d
50 changed files with 1077 additions and 51 deletions
@@ -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
}
}