method List.isEmpty
Whether the list has no elements.
Example:
fn main() io {
let xs: List<i32> = []
print("{xs.isEmpty()} {[1].isEmpty()}")
}Вывод
true false
True when the list has no elements.
Example:
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