def difference_of(lhs, rhs):
    """
    Computes the difference of two posting lists, that is, the elements
    in the first list which are not elements in the second list.
    """
    i = 0
    j = 0
    answer = []

    while (i < len(lhs)):
        if (j == len(rhs) or lhs[i] < rhs[j]):
            answer.append(lhs[i])
            i += 1
        elif (rhs[j] < lhs[i]):
            j += 1
        else:
            i += 1

    return answer