OxL Reference

method List.forEach

Calls f for every element.

Example:

oxl✓ checked in CI
fn main() io {
  ["x", "y"].forEach(s => print(s))
}
Output
x
y
pub(api) fn forEach<effect F>(f: fn(T) F) F

Since. 1.0.0-beta

Parameters

NameType
ffn(T) F

Effects

none declared (pure unless the body says otherwise)

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

See also