Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started