first

inline fun <T> MongoIterable<T>.first(crossinline predicate: (T) -> Boolean): T

Returns the first element matching the given predicate.

Throws

if no such element is found.