nix-config/lib/lists.nix

14 lines
251 B
Nix
Raw Normal View History

2021-08-24 22:25:12 +02:00
{ lib, ... }:
let
inherit (lib) filter;
in
{
# Filter a list using a predicate function after applying a map.
#
# mapFilter ::
# (value -> bool)
# (any -> value)
# [ any ]
mapFilter = pred: f: attrs: filter pred (map f attrs);
}