def v_dot(v, w):
    """
    Computes dot product of two vectors:
    v1 * w1 + ... + vn * wn
    """
    # A measure of how far v extends in the w direction
    return sum(v1 * w1 for v1, w1 in zip(v, w))