Good morning! Here's your coding interview problem for today.
This problem was asked by Squarespace.
Write a function, add_subtract, which alternately adds and subtracts curried arguments. Here are some sample operations:
add_subtract(7) -> 7
add_subtract(1)(2)(3) -> 1 + 2 - 3 -> 0
add_subtract(-5)(10)(3)(9) -> -5 + 10 - 3 + 9 -> 11