OxL Reference

fn drop

Destroys a value immediately (§5.8).

Example:

oxl✓ checked in CI
fn main() io {
  let big = [1, 2, 3]
  drop(big)
  print("dropped early")
}
Output
dropped early
@intrinsic("drop") pub(api) fn drop<T>(x: T)

Since. 1.0.0-beta

Parameters

NameType
xT

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/functions.oxl:162

See also