[Solved]Write Scheme Procedure Reduce Reduces List Removing First Last Component B Write Scheme Pr Q37276201
Functional Programming.

(a) Write a Scheme procedure reduce that reduces a list by removing its first and last component: (b) Write a Scheme procedure rotate_right that transforms a list as follows: (c) Write a Scheme procedure rotate left that transforms a list as follows: (d) Write a Scheme function (count e Ist) that counts the number of times the element e occurs in > (reduce ‘(1 2345) (2 3 4) > (rotate_right ( 23 45)) (5 1 2 3 4) > (rotate_left ‘(1 2 3 45)) (2 3 4 5 1) the list Ist. For example: > (count 1 ‘(1 2 1 2321)) (e) Write a Scheme function (countodd ist) that counts the number ofodd integers in the list lst. For example: > (countodd (12 12321)) Show transcribed image text (a) Write a Scheme procedure reduce that reduces a list by removing its first and last component: (b) Write a Scheme procedure rotate_right that transforms a list as follows: (c) Write a Scheme procedure rotate left that transforms a list as follows: (d) Write a Scheme function (count e Ist) that counts the number of times the element e occurs in > (reduce ‘(1 2345) (2 3 4) > (rotate_right ( 23 45)) (5 1 2 3 4) > (rotate_left ‘(1 2 3 45)) (2 3 4 5 1) the list Ist. For example: > (count 1 ‘(1 2 1 2321)) (e) Write a Scheme function (countodd ist) that counts the number ofodd integers in the list lst. For example: > (countodd (12 12321))
Expert Answer
Answer to (a) Write a Scheme procedure reduce that reduces a list by removing its first and last component: (b) Write a Scheme pro… . . .
OR

