from typing import Iterable


def operator_all(rules: list) -> bool:
    """
    An implementation of the **all** function, suited for the detection of
    scanning sequences.

    Parameters
    ----------
    rules : list
        List of booleans describing rules for a detector

    Returns
    -------
    bool
        True if all of the rules are True, False otherwise
    """
    return all(rules) if isinstance(rules, Iterable) else bool(rules)