doxysphinx.utils.iterators
#
The iterators module contains several iterator related helper functions.
Module Contents#
Functions#
|
Apply the action function to each element that matches the predicate. |
|
Apply the action function to the first element that matches the predicate. |
|
Apply the action function to all elements. |
Attributes#
- doxysphinx.utils.iterators.T#
- doxysphinx.utils.iterators.Predicate#
- doxysphinx.utils.iterators.Action#
- doxysphinx.utils.iterators.apply_if(iterable: Iterable[T], check: Predicate[T], action: Action[T])[source]#
Apply the action function to each element that matches the predicate.
- Parameters:
iterable – The input iterable (list etc…)
check – The predicate to check
action – The action to apply
- doxysphinx.utils.iterators.apply_if_first(iterable: Iterable[T], check: Predicate[T], action: Action[T])[source]#
Apply the action function to the first element that matches the predicate.
- Parameters:
iterable – The input iterable (list etc…)
check – The predicate to check
action – The action to apply