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 := set_of_ordered (lists.empty T) # T must inherit from has_total_order
What are effects?
Running Example
idiom34ex is x := set_of_ordered (lists.empty String) x := x.add "A" x := x.add "B" x := x.add "C" say x
What are effects?
next: Idiom # 35: First-class function : compose