Question: /** Return the smallest number in a list. * @pre !nums.isEmpty() * @return the smallest number in `nums`. */ static Double myMin( List nums )

/** Return the smallest number in a list. * @pre !nums.isEmpty() * @return the smallest number in `nums`. */ static Double myMin( List nums ) { // initialize our loop-variables: double minSoFar = nums.get(------); List numsRemaining = nums.subList(------- ,nums.size());

while ( ------------- ) { double a = numsRemaining.get(0); // corresponding to Scotts variable `a` minSoFar = ( ----------------- ? ---------------- : -------------- ); numsRemaining = ; } return minSoFar; }

using corresoonding variable name, convert the above code to a tail-recursive racket function.

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!