Write a Common Lisp predicate function that tests for the structural equality of two given lists. Two lists are structurally equal if they have the same list structure, although their atoms may be different. A script of defining and testing the function in Clisp on the empress system must be submitted.

Answers

Answer 1
Answer:

Answer:

Explanation:

For the Program plan:

1. Two lists are structurally equal if they have the same list structure, although their atoms may be different.

2. So we are going to write a function that will check if elements in both lists at same position are atoms or not.

3. If yes then it should return true else false.

Program:

#lang scheme

( define (structurally-equal list1 list2)

(cond ((and (null? list1) (null? list2)) #t)

((or (null? list1) (null? list2)) #f)

((and (atom? (car list1)) (atom? (car list2)))

(structurally-equal (cdr list1) (cdr list2)))

((or (atom? (car list1)) (atom? (car list2))) #f)

(else (and (structurally-equal (car list1) (car list2))

(structurally-equal (cdr list1) (cdr list2) )))))

( define (atom? x) (not (or (pair? x) (null? x))))


Related Questions

"queries are questions", true or false?
Media convergence is the result of the integration of the different media technologies. Please select the best answer from the choices provideda. True b. False
If we wanted to show the number of businesses in each of the categories in Yelp (where each business is usually in multiple categories based on the hierarchy), Which of the following chart types would be a good choice for showing the relative size of each category (size being based on the number of businesses in that category)? A. Scatter Plot B. Line Chart C. Treemap D. Choropleth Map
Which mineral is commonly found in igneous rocks?
Ryan is designing an app that needs to quickly send low quality photos between users. Most smartphones take much higher quality photos than Ryan needs for his app. Which answer best describes the type of compression Ryan should choose and why?A. Lossless compression since it ensures perfect reconstruction of the photo. B. Lossy compression since it ensures perfect reconstruction of the photo. C. Lossless compression since it typically results in smaller data sizes. D. Lossy compression since it typically results in smaller data sizes.

A ___ is a list of commands for doing different jobs on the computer​

Answers

Answer:

Menu

Explanation:

Riser cards on some proprietary systems plug into a unique socket or slot on the motherboard. These are also called________

Answers

Answer: Daughter board

Explanation:

A daughter board is refers to the circuit board and it is basically connected to the motherboard directly without any interruption.

It is also known as a daughter card which plugs and then extended the circuitry by connecting with the another circuit board. A mezzanine card and the riser card are the examples of the daughter board that used in the system.

According to the question, the riser card basically plus into the unique socket or the slot in the board and this is known as the daughter board.

Therefore, Daughter board is the correct answer.          

​The digital wallet stores a user’s payment information such as bank account and credit card numbers, a ____ to identify the user, and information that the user provides such as shipping information to speed up Internet transactions.a.​watermarkb.​digital fingerprintc.​photo IDd.digital certificate

Answers

Answer:

The answer is DIGITAL CERTIFICATE. LETTER D

Explanation:

The digital wallet stores a user's payment information such as bank account and credit card numbers, a digital certificate to identify the user, and information that provides such as shipping information to speed the transaction.

The consumer's information is encrypted to protect against identity theft and other forms of online piracy.

When an attacker attempts to get credit card numbers using telephone and voice technologies, it's calleda. Vishing
b. Telephishing
c. Phreaking
d. Voicing

Answers

Answer:

A. Vishing

Explanation:

The term 'Vishing' is a combination of  'Voice' and 'Phishing'.

Phishing is to get personal or confidential information (like credit card numbers) by pretending to be a trusted and enticing unsuspected individuals to provide their information, believing they're dealing with a reputable institution.

The question states the hacker is using telephone and voice technologies... so it's a voice version of the phishing.

How long does it take to charge the oculus quest 2

Answers

Answer:

around 2.5 hours

Explanation:

The Oculus Quest 2 will take around 2.5 hours to achieve a full charge. You can choose to charge it either using the USB-C adapter that comes in the box, or a Quest 2 charging dock for the headset and controllers. Oculus does recommend using the charger that is supplied with the headset.

Before attempting the​ exercise, click here to watch a short video. Of the following list of tools used at Arnold Palmer​ Hospital, which one graphically describes a process or​ system? A. flow charts B. check sheets C. flip charts D. OM charts

Answers

Answer:

A. flowcharts

Explanation:

Flowcharts are used to graphically describes a process or​ system. They can simulate the whole process step by step showing arrows between different steps.