lib: attrs: add 'merge'
This commit is contained in:
parent
ae23f05a33
commit
3c6e8933a1
|
@ -26,6 +26,13 @@ in
|
|||
# attrs
|
||||
genAttrs' = values: f: listToAttrs (map f values);
|
||||
|
||||
# Merge a list of attrs non-recursively, later values override previous ones.
|
||||
#
|
||||
# merge ::
|
||||
# [ attrs ]
|
||||
# attrs
|
||||
merge = foldl (a: b: a // b) { };
|
||||
|
||||
# Merge a list of attrs recursively, later values override previous ones.
|
||||
#
|
||||
# recursiveMerge ::
|
||||
|
|
Loading…
Reference in a new issue