OxL Справочник OxL
РусскийEnglish

method iter.isEmpty

true if the sequence has no elements (consumes the iterator).

Example:

oxl✓ проверяется в CI
fn main() io {
  let none_here: List<i32> = []
  print("{none_here.iter().isEmpty()} {[1].iter().isEmpty()}")
}
Вывод
true false
pub(api) move fn isEmpty() -> bool

Сложность. O(1): pulls at most one element.

С версии. 1.0.0-beta

Возвращает

bool

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/iter.oxl:596

См. также