flang.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 x := x.add "A" x := x.add "B" x := x.add "C" say x
What are effects?
next: Idiom # 35: First-class function : compose