pkgs:
let
  inherit (pkgs.lib) filterAttrs;
in {
  partition = p: a: {
    right = filterAttrs p a;
    wrong = filterAttrs (a: b: !p a b) a;
  };
}