zipAttrsWithNames
lib.zipAttrsWithNames
Docs pulled from | This Revision | 17 minutes ago
Merge sets of attributes and use the function f
to merge attributes
values.
Inputs
names
-
List of attribute names to zip.
f
-
A function, accepts an attribute name, all the values, and returns a combined value.
sets
-
List of values from the list of attribute sets.
Type
zipAttrsWithNames :: [ String ] -> (String -> [ Any ] -> Any) -> [ AttrSet ] -> AttrSet
Examples
lib.attrsets.zipAttrsWithNames
usage example
zipAttrsWithNames ["a"] (name: vs: vs) [{a = "x";} {a = "y"; b = "z";}]
=> { a = ["x" "y"]; }