Given the following code :
(define (g x y) (* x y))
(define (f x y z)
(define (h x y)(g (+ x y) x z))h)
Notice that I pass 3 arguments into g ,where g accepts only 2 .
However ,no error message is presented from the interpreter , why ?
Regards
You aren’t actually calling h here, only returning it. Properly formatted your code should look like:
So when you call (f 1 2 3) you get back h. If you call
then the interpreter will give an error.