fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 314: Fill array with value
Idiom # 314: Fill array with value
See
programming-idioms.org
:
Immutable Arrays
Code
x1 := x.map_to_array _->v
What are effects?
Runnable Example
ex314 is # Arrays in Fuzion are immutable, creating a new array instead x := [1,2,3,4,5] v := 0 x1 := x.map_to_array _->v say x say x1
What are effects?
Using mutate effect
Runnable Example
ex314 is # Arrays in Fuzion are immutable, creating a new array instead x := [1,2,3,4,5] v := 0 x1 := x.map_to_array _->v say x say x1
What are effects?
last changed: 2024-07-01
next: NYI: Idiom # 315: Memoization