zipAttrsWith
builtins.zipAttrsWith
Primop
Docs pulled from | This Revision | about 1 hour ago
Takes 2 arguments
f, list
Merge sets of attributes and use the function f to merge attribute values.
Like lib.attrsets.zipAttrsWithNames
with all key names are passed for names
.
Implementation note: Common names appear multiple times in the list of
names, hopefully this does not affect the system because the maximal
laziness avoid computing twice the same expression and listToAttrs
does
not care about duplicated attribute names.
Type
zipAttrsWith :: (String -> [ Any ] -> Any) -> [ AttrSet ] -> AttrSet
Examples
lib.attrsets.zipAttrsWith
usage example
zipAttrsWith (name: values: values) [{a = "x";} {a = "y"; b = "z";}]
=> { a = ["x" "y"]; b = ["z"]; }
This function is not defined in a .nix file. It is likely a builtins function or an alias of a builtins function. builtins functions are predefined functions provided by Nix.
Noogle detected
Implementation
This function is implemented in c++ and is part of the native nix runtime.