from typing import Iterable, Callable, Sequence


def chain_call(fns: Iterable[Callable], *initial_call_arguments):
    """
    Simple recipe to chain call functions with matching input and output arguments.
    """
    arguments_signature = len(initial_call_arguments)
    if arguments_signature < 1:
        raise Exception("Cannot chain functions without input")
    elif arguments_signature == 1:
        arg = initial_call_arguments[0]
        for fn in fns:
            arg = fn(arg)
        return arg
    # unpack multiple arguments for calls
    args = initial_call_arguments
    for fn in fns:
        args = fn(*args)
    return args
