def search_in_iter(l, p):
    """Find the first element matching the predicate in an iterable.

    :type l: list[T]
    :type p: (T) -> bool
    :rtype: T
    """
    for i in l:
        if p(i):
            return i
    return None
