diff --git a/doc/functions/library/attrsets.xml b/doc/functions/library/attrsets.xml index fe44dfe4f8e6..da73e02e0561 100644 --- a/doc/functions/library/attrsets.xml +++ b/doc/functions/library/attrsets.xml @@ -1441,4 +1441,83 @@ lib.attrsets.zipAttrsWithNames ]]> + +
+ <function>lib.attrsets.zipAttrsWith</function> + + zipAttrsWith :: (String -> [ Any ] -> Any) -> [ AttrSet ] -> AttrSet + + + + + + Merge sets of attributes and use the function f to merge + attribute values. Similar to where + all key names are passed for names. + + + + + + f + + + + (String -> [ Any ] -> Any + + + Accepts an attribute name, all the values, and returns a combined value. + + + + + name + + + + The name of the attribute each value came from. + + + + + + vs + + + + A list of values collected from the list of attribute sets. + + + + + + + + + sets + + + + A list of attribute sets to zip together. + + + + + + + Summing a list of attribute sets of numbers + { a = "a 11"; b = "b 101"; c = "c 1001"; } + ]]> + +