about summary refs log tree commit diff
path: root/tvix/eval/src/tests/nix_tests/eval-okay-sort.nix
blob: 8299c3a4a3aa0e245b009461943f65a03daf72f7 (plain) (blame)
1
2
3
4
5
6
7
8
with builtins;

[ (sort lessThan [ 483 249 526 147 42 77 ])
  (sort (x: y: y < x) [ 483 249 526 147 42 77 ])
  (sort lessThan [ "foo" "bar" "xyzzy" "fnord" ])
  (sort (x: y: x.key < y.key)
    [ { key = 1; value = "foo"; } { key = 2; value = "bar"; } { key = 1; value = "fnord"; } ]) 
]