anchor.diff:         => { a = { b = 3; }; }
     */
     setAttrByPath = attrPath: value:
  -    if attrPath == [] then value
  -    else listToAttrs
  -      [ { name = head attrPath; value = setAttrByPath (tail attrPath) value; } ];
  -
  +    let
  +      len = length attrPath;
  +      atDepth = n:
  +        if n == len
  +        then value
  +        else { ${elemAt attrPath n} = atDepth (n + 1); };
  +    in atDepth 0;
   
     /* Like `attrByPath' without a default value. If it doesn't find the
        path it will throw.
  
positive.code:          ]
    */
    cartesianProductOfSets = attrsOfLists:
      lib.foldl' (listOfAttrs: attrName:
        concatMap (attrs:
          map (listValue: attrs // { ${attrName} = listValue; }) attrsOfLists.${attrName}
        ) listOfAttrs
  
negative.code:   inherit (builtins) head tail length;
    inherit (lib.trivial) and;
    inherit (lib.strings) concatStringsSep sanitizeDerivationName;
    inherit (lib.lists) foldr foldl' concatMap concatLists elemAt;
  in
  
  rec {
  