lib: remove upstreamed function repeat (replicate)

This commit is contained in:
2023-07-28 21:51:40 +02:00
parent b5874e2bcd
commit 0137f4f5a9
4 changed files with 7 additions and 13 deletions

View File

@@ -284,9 +284,7 @@ in rec {
inherit (lib.strings) concatStringsSep;
inherit (extendedLib.strings) repeatString;
inherit (lib.lists) range flatten;
inherit (extendedLib.lists) repeat;
inherit (lib.lists) range flatten replicate;
inherit (lib.attrsets) nameValuePair listToAttrs;
nthCds = n: [
@@ -296,7 +294,7 @@ in rec {
("." + toString n)
(".." + toString n)
];
realCommand = n: "cd " + (concatStringsSep "/" (repeat ".." n));
realCommand = n: "cd " + (concatStringsSep "/" (replicate n ".."));
nthCdsAsNameValuePairs = n: map (cmd: nameValuePair cmd (realCommand n)) (nthCds n);
allCdNameValuePairs = flatten (map nthCdsAsNameValuePairs (range 1 9));