1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 02:21:16 +02:00
nix/tests/functional/lang/eval-okay-sort.nix
Robert Hensing 96e550efc5 Format .nix files
... with nixfmt (rfc style)
2025-01-24 17:04:02 +01:00

64 lines
608 B
Nix

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";
}
])
(sort lessThan [
[
1
6
]
[ ]
[
2
3
]
[ 3 ]
[
1
5
]
[ 2 ]
[ 1 ]
[ ]
[
1
4
]
[ 3 ]
])
]