1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 02:43:54 +02:00

Add primops all and any

These are used thousands of times during NixOS evaluation, so it's
useful to speed them up.
This commit is contained in:
Eelco Dolstra 2015-07-23 19:23:11 +02:00
parent 39e27a04b8
commit 14be783676
4 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1 @@
[ false false true true true true false true ]

View file

@ -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])
]