flang.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 y := x & p say y y := x.filter p say y
What are effects?
next: Idiom # 58: Extract file content to a string