lib: attrs: add 'merge'

This commit is contained in:
Bruno BELANYI 2023-02-25 01:03:24 +00:00
parent ae23f05a33
commit 3c6e8933a1

View file

@ -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 ::