Question: Write the following Scheme functions: A function makeExploder, that takes as input a list L of length 3. It then builds and returns an exploder

Write the following Scheme functions:
A function "makeExploder", that takes as input a list L of length 3. It then builds and returns an "exploder" function based on L. The "exploder" function that is produced (by your function makeExploder) would have the property that it takes as input an integer N, and returns an "exploded" version of N. "Exploding" a number means first adding X to it, then multiplying it by Y, then raising that result to the power of Z. The values of X, Y, and Z correspond to the three values in the original list L that was sent to makeExploder. For example, if makeExploder was called as follows: (define P (makeExploder '(2 5 3))) then the the produced function P would behave as follows: (P 4) would return 27000 (P 5) would return 42875 Your task is to write makeExploder, not P. You may find it useful to write one or more utility functions. Of course, makeExploder should work for any reasonable input list, not just the one shown above. 

Write a scheme function that basically takes an input of Length 3 integers.

and does the following

x = first integer y= second integer z = third integer

using the exploder function with an integer should result in

((integer) + x * y)^z

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!