Transform the following algorithm into a functional programming style in Python.
def add_number(x,y):
    total = 0
    for i in range(x,y):
        total += i
    return total
def add_number(x, y):
    return sum(range(x, y))