Function adapton::catalog::collections::filter_list_of_tree
[−]
[src]
pub fn filter_list_of_tree<Lev: Level, X: Hash + Clone + 'static, L: ListIntro<X> + ListElim<X> + 'static, T: TreeElim<Lev, X> + 'static>(
tree: T,
pred: Box<Fn(&X) -> bool>
) -> L
Filter the leaf elements of a tree using a user-provided predicate, pred
.
Returns a list of the elements for which the predicate returns true
.
Retains exactly one name between any two elements that, in the original sequence, were separated by a name.
Does not insert names that were not present in the original sequence.