OxL Reference

method Map.keys

The keys, in insertion order.

Example:

oxl✓ checked in CI
fn main() io {
  let m = {"b": 2, "a": 1}
  print("{m.keys()}")
}
Output
["b", "a"]

The keys, in the iteration order of the map.

Example:

oxl✓ checked in CI
fn main() io {
  let m: Map<str, i32> = {"a": 1}
  print("{m.keys()}")
}
Output
["a"]
pub(api) fn keys() -> List<K>

Complexity. O(n).

Since. 1.0.0-beta

Returns

List<K>

Effects

none declared (pure unless the body says otherwise)

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

See also