OxL Reference

method Set.isEmpty

Whether the set has no elements.

Example:

oxl✓ checked in CI
fn main() io {
  let s: Set<i32> = Set.new()
  print("{s.isEmpty()}")
}
Output
true

True when the set has no elements.

Example:

oxl✓ checked in CI
fn main() io {
  print("{Set<i32>.new().isEmpty()}")
}
Output
true
pub(api) fn isEmpty() -> bool

Complexity. O(1).

Since. 1.0.0-beta

Returns

bool

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/collections.oxl:1006

See also