Noogλe
search input
Function of the day
Recursively collect sets that verify a given predicate named
predfrom the setattrs. The recursion is stopped when the predicate is verified.Inputs
pred-
Given an attribute's value, determine if recursion should stop.
attrs-
The attribute set to recursively collect.
Type
collect :: (AttrSet -> Bool) -> AttrSet -> [Any]Examples
lib.attrsets.collectusage examplecollect isList { a = { b = ["b"]; }; c = [1]; } => [["b"] [1]] collect (x: x ? outPath) { a = { outPath = "a/"; }; b = { outPath = "b/"; }; } => [{ outPath = "a/"; } { outPath = "b/"; }]