Helper for doing the next splitter check.
    
    If the list is not empty, call the next splitter decorator appropriately,
    otherwise call the decorated function.

def next_splitter_or_func(string, splitters, func, pseudo_type):
    """
    Helper for doing the next splitter check.
    
    If the list is not empty, call the next splitter decorator appropriately,
    otherwise call the decorated function.
    """
    if splitters:
        return splitters[0](string, splitters[1:])(func)(pseudo_type,
            string)
    else:
        return func(pseudo_type, string)