lib: add concatMap

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-15 10:10:43 +03:00
parent 188ace87db
commit b82eb761c4
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

13
lib.nix
View file

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