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