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

method List.isEmpty

Whether the list has no elements.

Example:

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

True when the list has no elements.

Example:

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

Сложность. O(1).

С версии. 1.0.0-beta

Возвращает

bool

Эффекты

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

Определено в: std/core/collections.oxl:82

См. также