Goals:

• Review and develop a deep and comprehensive understanding of functional programming
• Review and develop a deep and comprehensive understanding of the divide-and-conquer technique andprogramming technique such as recursionInstructions:In this assignment, you will complete four programs using Scheme. Please read the following requirements carefully:
• Use Scheme as a pure functional programming language.
• Use divide-and-conquer technique (If a function is big/not single-mined, write subfunctions.) and recursionprogramming technique.
• Each program must be tested completely. There must be at least 10 test cases. Include the test cases at thebottom of the program.
• Adequate comments must be provided for each logical block of a program. If a built-in function is used, theexplanation of the function must be included. Assignments with minimal comments will be rejected with no credits. The following built-in functions are not allowed in this assignment:o reverse o max
o min
o mapo apply
• Codes must be properly formatted.
• Save each part in its own program. Submit them all on Blackboard.Part I (10 points):abs is a built-in function that takes an argument and returns the absolute value of the argument. For example,> (abs 3.22) 3.22
> (abs -5.16) 5.16> (abs -2) 2Write a function that takes a list as an argument and returns a list of absolute values of each of the elements. Assume the list will contain 0 or more numbers and no sublists. Built-in functions map or apply can’t be used.Part II (10 points each):

a) Write a function that takes an atom and a list as parameters and returns a list identical to its parameter list except with all instances of the given atom deleted. For example, the following shows four test cases.

An atom a
a

A list

```(a b c d a c a a)
((a b) c () d a c a a)
```

The retuned list

```(b c d c)
((b) c () d c)
```

a (((a (a)) b) c () d a c a a) (((()) b) c () d c) a (a b c d a c (a ((a)))a a) (b c d c ((())))

b) Write a function that takes two atoms and a list as parameters and returns a list identical to the parameter list except all occurrences of the first given atom in the list are replaced with the second given atom, no matter how deeply the first atom is nested.

Part III (20 points):

Write a bubble sort function that takes a list as the only parameter and returns a sorted list. Assume that there are no sublists in the original list.

attachment_1
attachment_2
attachment_3
Pages (275 words)
Standard price: \$0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back