Question: Question 1 (A) Write Scheme code that creates the following: [3 marks] A cons pair of two numbers A list of 3 numbers, using only
Question 1
(A) Write Scheme code that creates the following: [3 marks]
A cons pair of two numbers
A list of 3 numbers, using only the cons function.
A list containing a string, a number and a nested list of three numbers, using only the cons function.
A list containing a string, a number and a nested list of three numbers, using only the list function.
A list containing a string, a number and a nested list of three numbers, using only the append function.
(B) Comment on result. Mention the difference between the cons, list and append functions. [3 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
