def diff(data: list[int]) -> list[int]:
    """Calculate the difference between numeric values in a list."""
    previous = data[0]
    difference = []

    for value in data[1:]:
        difference.append(value - previous)
        previous = value
    return difference