Noogλe
search input
Function of the day
Takes 2 arguments
attr, list
Collect each attribute named
attrfrom a list of attribute sets. Sets that don't contain the named attribute are ignored.Inputs
attr-
The attribute name to get out of the sets.
list-
The list of attribute sets to go through
Type
catAttrs :: String -> [{ [String] :: a }] -> [a]Examples
lib.attrsets.catAttrsusage examplecatAttrs "a" [{a = 1;} {b = 0;} {a = 2;}] => [1 2]