lib: add concatMap
This commit is contained in:
parent
188ace87db
commit
b82eb761c4
1 changed files with 7 additions and 6 deletions
13
lib.nix
13
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;
|
||||
}
|
||||
|
|
Reference in a new issue