fun <T> MongoIterable<T>.last(): T
(source)
Returns the last element.
NoSuchElementException
- if the collection is empty.
inline fun <T> MongoIterable<T>.last(crossinline predicate: (T) -> Boolean): T
(source)
Returns the last element matching the given predicate.