OxL Reference

method Set.iter

Lazy iterator over a snapshot of the elements (insertion order).

Example:

oxl✓ checked in CI
fn main() io {
  var s: Set<str> = Set.new()
  s.insert("b")
  s.insert("a")
  print("{s.iter().collect()}")
}
Output
["b", "a"]
pub(api) fn iter() -> iter<T>

Complexity. O(n) to take the snapshot.

Since. 1.0.0-beta

Returns

iter<T>

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/iter.oxl:853

See also