# Scheme functions problem set 2 solution

24.99 \$

Write the following Scheme functions: A. “fracktorial” – takes an integer and computes the “fracktorial” of the integer. The “fracktorial” of a number is similar to the factorial, except that only the even values are multiplied together. For example, the “fracktorial” of 8 is 8*6*4*2 = 384, and would be called with (fracktorial 8), which should return 384. Similarly the “fracktorial” of 7 would be 6*4*2 = 48, and would be called with (fracktorial 7). Assume that the function is defined only for integers of size at least 1, and that the fracktorial of 1 is defined to be equal to 1. B. “reverseListHalves” – takes a list and reverses the elements of both the left half and the right half of the list. For example, (reverseListHalves ‘(1 2 3 4 5 6 7 8)) would return (4 3 2 1 8 7 6 5). Your function should also work on odd-length lists, in which case it would leave the center item unmoved. For example: (reverseListHalves ‘(1 2 3 4 5 6 7 8 9)) would return (4 3 2 1 5 9 8 7 6). You will probably find it useful to break the problem down and create some helper functions.

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . ` zip` solution files instantly, after Payment

## Description

Rate this product