i see both of the following functions are syntactically tail recursive ones, but, in racket, which of them is really treated as tail recursion, or both? i mean whether it is optimized as tail recursion by the interpreter.
;;1
(define (foo i m s)
(if (< i m)
(foo (+ i 1) m (+ i s))
s))
;;2
(define (foo i m s)
(if (= i m)
s
(foo (+ i 1) m (+ i s))))
are there any different answers in other lisps?