def gaps(data):
    """
    Return a list of the gap sizes, given a list of numbers.  (If input
    is length n, result is length n-1)
    """
    result = []
    for i in range(len(data) - 1):
        result.append(data[i + 1] - data[i])
    return result
