fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 34: Create a Set of objects
Idiom # 34: Create a Set of objects
See
programming-idioms.org
:
Code
x := container.set_of_ordered (list T).type.empty # T must inherit from has_total_order
What are effects?
Running Example
idiom34ex is x := container.set_of_ordered (list String).type.empty x1 := x.add "A" x2 := x1.add "B" x3 := x2.add "C" say x3
What are effects?
last changed: 2024-07-01
next: Idiom # 35: First-class function : compose