diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-23 19:23:11 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-23 19:23:11 +0200 |
commit | 14be783676adbb3517b2f73fee31c6f341575440 (patch) | |
tree | 759d4cec921a562e5c3f00ec9db251639ae5e526 /doc/manual | |
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 'doc/manual')
-rw-r--r-- | doc/manual/expressions/builtins.xml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/manual/expressions/builtins.xml b/doc/manual/expressions/builtins.xml index 0b11e2f5a..cb987ca02 100644 --- a/doc/manual/expressions/builtins.xml +++ b/doc/manual/expressions/builtins.xml @@ -39,6 +39,28 @@ available as <function>builtins.derivation</function>.</para> </varlistentry> + <varlistentry><term><function>builtins.all</function> + <replaceable>pred</replaceable> <replaceable>list</replaceable></term> + + <listitem><para>Return <literal>true</literal> if the function + <replaceable>pred</replaceable> returns <literal>true</literal> + for all elements of <replaceable>list</replaceable>, + and <literal>false</literal> otherwise.</para></listitem> + + </varlistentry> + + + <varlistentry><term><function>builtins.any</function> + <replaceable>pred</replaceable> <replaceable>list</replaceable></term> + + <listitem><para>Return <literal>true</literal> if the function + <replaceable>pred</replaceable> returns <literal>true</literal> + for at least one element of <replaceable>list</replaceable>, + and <literal>false</literal> otherwise.</para></listitem> + + </varlistentry> + + <varlistentry><term><function>builtins.attrNames</function> <replaceable>set</replaceable></term> |