allow comments to include source code from test methods to demonstrate an API in action in code thats actually tested to be accurate. #KT-1458 Fixed
This commit is contained in:
@@ -2,7 +2,11 @@ package kotlin
|
||||
|
||||
import java.util.*
|
||||
|
||||
/** Returns true if any elements in the collection match the given predicate */
|
||||
/**
|
||||
* Returns true if any elements in the collection match the given predicate
|
||||
*
|
||||
* @includeFunction ../test/CollectionTest.kt any
|
||||
*/
|
||||
inline fun <T> java.lang.Iterable<T>.any(predicate: (T)-> Boolean) : Boolean {
|
||||
for (elem in this) {
|
||||
if (predicate(elem)) {
|
||||
|
||||
Reference in New Issue
Block a user