Question: Exercise 7.22: mult-by-scalar In Exercise 3.1, we called a list of numbers an n-tuple. Using flat-recur, define a procedure mult-by-scalar that takes as its argument

 Exercise 7.22: mult-by-scalar In Exercise 3.1, we called a list of

Exercise 7.22: mult-by-scalar In Exercise 3.1, we called a list of numbers an n-tuple. Using flat-recur, define a procedure mult-by-scalar that takes as its argument a number c and returns a procedure that takes as its argument an n-tuple ntpl and multiplies each component of ntpl by the number c. Test your procedure on: ((mult-by-scalar 3) '(1 -2 3-4)) = (3-6 9 -12) ((mult-by-scalar 5) '()) ()

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!