from typing import Callable
from typing import Any
from typing import List


def single_to_multiple(processor: Callable[[Any], List[Any]])->Callable[[List[Any]], List[Any]]:
    """
    Creates a processor that accepts a list of elements.

    Converts a processor that handles one element and returns a list of elements into
    a processor that handles a list of elements and returns a list of elements by calling
    each element in the list in turn and joining the intermediate results into one result

    * **processor**: a processor that operates on one element
    * **return** : a processor that operates on a list of elements

    >>> def square_pair(x):
    ...     return[x , x*x]
    >>> mult = single_to_multiple(square_pair)
    >>> mult([1,2,3,4])
    [1, 1, 2, 4, 3, 9, 4, 16]
    """

    def inner( elms: List[Any])-> List[Any]:
        result = []
        for elm in elms:
            if elm is not None:
                result += processor(elm)
        return result

    return inner