Question: Consider the scheme function definition: (define (f n) (if (= n 0) 1 (* n (f (- n 1))))) which one of the following statements

Consider the scheme function definition:

(define (f n) (if (= n 0) 1 (* n (f (- n 1)))))

which one of the following statements is true:

1. The expression (> (f 8) 80) evaluates to a list.

2. The expression (f 2) evaluates to a boolean value.

3. The expression (+ (f 4) 4) evaluates to an integer.

4. The function f makes at least one recursive call to itself whenever it is called.

5. The expression (- n 1) should be (n - 1) in Scheme syntax.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!