fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 100: Sort by a comparator
Idiom # 100: Sort by a comparator
See
programming-idioms.org
:
Code
Code input
items.sort_by c
What are effects?
Runnable Example
Code input
ex100 is items := [ "siebenundvierzig"; "elf"; "null"; "acht"; "fünfzehn" ] c String -> i32 := .byte_count say (items.sort_by c) # passing the lambda directly to sort avoids # specifying its type: # say (items.sort_by (.byte_count))
What are effects?
last changed: 2026-06-12
next: NYI: Idiom # 101: Load from HTTP GET request into a string