Nix has an [attribute selection operator `.`](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:
@@ -111,7 +111,7 @@ rec {
attrByPath'0set;
/**
Return if an attribute from nested attribute set exists.
Returns if an attribute from nested attribute set exists.
Nix has a [has attribute operator `?`](https://nixos.org/manual/nix/stable/language/operators#has-attribute), which is sufficient for such queries, as long as the number of attributes is static. For example:
@@ -177,7 +177,7 @@ rec {
hasAttrByPath'0e;
/**
Return the longest prefix of an attribute path that refers to an existing attribute in a nesting of attribute sets.
Returns the longest prefix of an attribute path that refers to an existing attribute in a nesting of attribute sets.
Can be used after [`mapAttrsRecursiveCond`](#function-library-lib.attrsets.mapAttrsRecursiveCond) to apply a condition,
although this will evaluate the predicate function on sibling attributes as well.
@@ -504,7 +504,7 @@ rec {
updates:value:go0truevalueupdates;
/**
Return the specified attributes from a set.
Returns the specified attributes from a set.
# Inputs
@@ -536,7 +536,7 @@ rec {
attrVals=nameList:set:map(x:set.${x})nameList;
/**
Return the values of all attributes in the given set, sorted by
Returns the values of all attributes in the given set, sorted by