method List.forEach
Calls f for every element.
Example:
fn main() io {
["x", "y"].forEach(s => print(s))
}Output
x y
pub(api) fn forEach<effect F>(f: fn(T) F) FSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
f | fn(T) F |
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/collections.oxl:561