def transform(token, operations=None):
    """
    Apply transformations to token.
    """
    for operation in operations if operations else []:
        token = operation(token)
        if token is None:
            break

    return token