I keep receiving "The object 5.32 is not applicable" after running (main 1 2) then inputting 2 and finally -1. 5.32 is the correct answer. It just throws the mentioned error. (Should return ;Value 5.32).
I think my issue may be in my tax function, but am unsure. Any suggestions?
(define (add total num)(+ total num))
(define (tax total) (* total 1.065))
(define (main total x)
(if (= x -1)
(tax total)
((let ((z (add total x)))(let ((y (read)))(main z y))))
)
)
And yes, I've checked here and here, though neither location answers the question in a general format.