anchor.diff:           ]
     */
     cartesianProductOfSets = attrsOfLists:
  -    lib.foldl' (listOfAttrs: attrName:
  +    foldl' (listOfAttrs: attrName:
         concatMap (attrs:
           map (listValue: attrs // { ${attrName} = listValue; }) attrsOfLists.${attrName}
         ) listOfAttrs
  
positive.code:   inherit (builtins) head tail length;
    inherit (lib.trivial) and;
    inherit (lib.strings) concatStringsSep sanitizeDerivationName;
    inherit (lib.lists) fold foldr concatMap concatLists;
  in
  
  rec {
  
negative.code:        => { a = { b = 3; }; }
    */
    setAttrByPath = 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.
  