stockholm/krebs/4lib/listset.nix
2015-07-28 21:38:22 +02:00

12 lines
198 B
Nix

{ 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]; };
}