catAttrs
builtins.catAttrs
Primop
Docs pulled from | This Revision | 10 minutes ago
Takes 2 arguments
attr, list
Collect each attribute named attr
from 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 -> [AttrSet] -> [Any]
Examples
lib.attrsets.catAttrs
usage example
catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}]
=> [1 2]
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.