diff --git a/lib.nix b/lib.nix index 037adb0..c4479bd 100644 --- a/lib.nix +++ b/lib.nix @@ -13,6 +13,12 @@ rec { in fold' 0; + concatMap = op: list: + let + concat = (a: b: op a + b); + in + foldr concat "" list; + extractAttrs = attr: list: let getAttr' = builtins.getAttr attr; @@ -30,10 +36,5 @@ rec { EOF ''; - mkLuaRc = contents: - let - concat = (a: b: a + b); - luaHeredors = builtins.map mkLuaHeredoc contents; - in - foldr concat "" luaHeredors; + mkLuaRc = contents: concatMap mkLuaHeredoc contents; }