from typing import Callable
from typing import Any
from typing import Iterable
from typing import Optional


def find(predicate: Callable[[Any], Any], seq: Iterable) -> Optional[Any]:
    """
    Return the first element in the sequence which meets the predicate.

    If an entry is not found, then None is returned.

    This is different from python's filter due to the fact it stops the
    moment it finds a valid entry.

    Parameters
    -----------
    predicate
        a function that returns a boolean-like result

    seq
        an iterable to search through
    """
    for element in seq:
        if predicate(element):
            return element
    return None