stockholm/krebs/4lib/listset.nix

12 lines
198 B
Nix
Raw Normal View History

{ lib, ... }:
with lib;
rec {
# listset k v = set k [v]
# insert : k -> v -> listset k v -> listset k v
insert = name: value: set:
set // { ${name} = set.${name} or [] ++ [value]; };
}