optimize tail recursion

letloop f = (x, acc) -> if! x==1 acc f(x-1, x+acc) then f(3, 0)