fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 240: Sort 2 lists together
Idiom # 240: Sort 2 lists together
See
programming-idioms.org
:
Code
sort list b based on the sorting of list a
Code input
s := a0.zip b0 tuple .sort_by (.0) a1 := s.map (.0) b1 := s.map (.1)
What are effects?
Runnable Example
Code input
ex240 is a0 := [ "siebenundvierzig", "elf", "null", "acht", "fünfzehn" ] b0 := [ "47", "11", "0", "8", "15" ] s := a0.zip b0 tuple .sort_by (.0) a1 := s.map (.0) b1 := s.map (.1) say a1 say b1
What are effects?
last changed: 2026-06-12
next: NYI: Idiom # 241: Yield priority to other threads