fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 57: Filter list
Idiom # 57: Filter list
See
programming-idioms.org
:
Code
y := x & p # alternative, using a call to 'filter' instead of 'infix &' y := x.filter p
What are effects?
Running Example
ex57 is x := [0, 8, 15, 47, 11] p i32 -> bool := i -> i % 3 = 2 y0 := x & p say y0 y1 := x.filter p say y1
What are effects?
last changed: 2024-07-01
next: Idiom # 58: Extract file content to a string