def negate(vec):
    """Negates a vector in iterable form.

    Args:
        vec (iterable): a vector iterable.

    Returns:
        iterable: the resultant vector.
    """
    if type(vec) == tuple:
        return tuple([-i for i in vec])
    else:
        return [-i for i in vec]