-- in.cue --
import "list"

a: list.Sort([2, 3, 1, 4], {x: _, y: _, less: x < y})
-- out/evalalpha/stats --
Leaks:  11
Freed:  0
Reused: 0
Allocs: 11
Retain: 0

Unifications: 11
Conjuncts:    11
Disjuncts:    0
-- diff/-out/evalalpha/stats<==>+out/eval/stats --
diff old new
--- old
+++ new
@@ -1,9 +1,9 @@
-Leaks:  0
-Freed:  15
-Reused: 10
-Allocs: 5
-Retain: 2
+Leaks:  11
+Freed:  0
+Reused: 0
+Allocs: 11
+Retain: 0
 
-Unifications: 15
-Conjuncts:    24
-Disjuncts:    17
+Unifications: 11
+Conjuncts:    11
+Disjuncts:    0
-- out/eval/stats --
Leaks:  0
Freed:  15
Reused: 10
Allocs: 5
Retain: 2

Unifications: 15
Conjuncts:    24
Disjuncts:    17
-- out/eval --
(struct){
  a: (#list){
    0: (int){ 1 }
    1: (int){ 2 }
    2: (int){ 3 }
    3: (int){ 4 }
  }
}
-- out/compile --
--- in.cue
{
  a: 〈import;list〉.Sort([
    2,
    3,
    1,
    4,
  ], {
    x: _
    y: _
    less: (〈0;x〉 < 〈0;y〉)
  })
}
