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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started