about summary refs log blame commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-stable-sort.nix
blob: 9969e0a29433915df964c4260bb8996d215bc078 (plain) (tree)
1
2
3
4
5
6
7






                                                                                                         
let
  keys = [ 1 2 3 2 2 2 5 0 5 5 4 3 2 1 2 3 22 ];
in

builtins.sort
  (a: b: a.key < b.key)
  (builtins.genList (index: { inherit index; key = builtins.elemAt keys index; }) (builtins.length keys))