kotlin-koans icon indicating copy to clipboard operation
kotlin-koans copied to clipboard

[online] Kotlin Koans 5/42 contains incorrect assertion

Open Gatoke opened this issue 6 years ago • 0 comments

In online Kotlin Koans https://try.kotlinlang.org at task 5/42 'Lambdas' when I type:

fun containsEven(collection: Collection<Int>): Boolean = collection.any { i -> i/2 == 0 }

I pass the test but I shouldn't. Note that there is i/2 instead of i%2.

image

DoD The lambda i -> i/2 == 0 should not be accepted in this task.

Gatoke avatar Nov 07 '18 16:11 Gatoke