def compose(*functions):
    """Define functions composition like f ∘ g ∘ h
    :return: callable object that will perform
    function composition of callables given in argument.
    """

    def _compose2(f, g):  # pylint: disable=invalid-name
        return lambda x: f(g(x))

    return functools.reduce(_compose2, functions, lambda x: x)
def compose ( * functions ) : def _compose2 ( f , g ) : return lambda x : f ( g ( x ) ) return functools . reduce ( _compose2 , functions , lambda x : x )
Define functions composition like f ∘ g ∘ h
    :return: callable object that will perform
    function composition of callables given in argument.