filterOverrides'
lib.modules.filterOverrides'
Docs pulled from | This Revision | 18 days ago
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
Noogle detected
Implementation
The following is the current implementation of this function.
defs:
# Optimize for the singleton case, equivalent to the `else` clause.
if length defs == 1 then
{
values = map strip defs;
highestPrio = getPrio (head defs);
}
else
let
highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs;
in
{
values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs;
inherit highestPrio;
}