diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-23T17·23+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-23T17·23+0200 |
commit | 14be783676adbb3517b2f73fee31c6f341575440 (patch) | |
tree | 759d4cec921a562e5c3f00ec9db251639ae5e526 /tests/lang/eval-okay-any-all.nix | |
parent | 39e27a04b8d1fc8251128b1f9f8f152b8c8a9b68 (diff) |
Add primops all and any
These are used thousands of times during NixOS evaluation, so it's useful to speed them up.
Diffstat (limited to 'tests/lang/eval-okay-any-all.nix')
-rw-r--r-- | tests/lang/eval-okay-any-all.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-any-all.nix b/tests/lang/eval-okay-any-all.nix new file mode 100644 index 000000000000..a3f26ea2aa83 --- /dev/null +++ b/tests/lang/eval-okay-any-all.nix @@ -0,0 +1,11 @@ +with builtins; + +[ (any (x: x == 1) []) + (any (x: x == 1) [2 3 4]) + (any (x: x == 1) [1 2 3 4]) + (any (x: x == 1) [4 3 2 1]) + (all (x: x == 1) []) + (all (x: x == 1) [1]) + (all (x: x == 1) [1 2 3]) + (all (x: x == 1) [1 1 1]) +] |