1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nuetrik [128]
3 years ago
6

Code the function (insertNth list N insValue) which constructs a new list by inserting the specified insValue into the list afte

r the Nth top-level value (relative to 1).Example:> (insertNth '(X Y Z) 2 'FUN)(X Y FUN Z)> (insertNth '(X Y Z) 4 'FUN)(X Y Z)
Computers and Technology
1 answer:
-BARSIC- [3]3 years ago
3 0

Answer:

Explanation:

Function algorithm is coded below

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

2. Replace in Function

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

(defun replace-all (string part replacement &key (test #'char=))

 "Returns a new string in which all the occurrences of the part is replaced with replacement."

 (with-output-to-string (out)

   (loop with part-length = (length part)

         for old-pos = 0 then (+ pos part-length)

         for pos = (search part string

                           :start2 old-pos

                           :test test)

         do (write-string string out

                          :start old-pos

                          :end (or pos (length string)))

         when pos do (write-string replacement out)

         while pos)))

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

3. Insert After

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

(defun insert-after (lst index newelt)

(push newelt (cdr (nthcdr index lst)))

lst)

(insert-after '(a c d) 0 'b) => (A B C D)

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

4. insertNth

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

(defun insertNth(number index list)

 (do ((head '() (list* (first tail) head))

      (tail list (rest tail))

      (index index (1- index)))

     ((zerop index)

      (nreconc head (list* (+ number (first tail))

                           (rest tail))))))

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

5. InsertAfterAll

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

(defun InsertAfterAll (a v)

  (if (null v) (cons a nil) (cons (car v) (endcons a (cdr v)))))

(endcons 'a '(b c d))

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

You might be interested in
Nadeen runs a website on vegan lifestyle. She wants to spread the word and make more people visit her site to read her recipes a
pashok25 [27]

What Nadeen needs to do to get people to engage with her web site is to regularly post new content and regularly respond to user comments and questions (options A and C).

<h3>What should Nadeen do to increase visits to her website?</h3>

Currently, social networks and pages have become tools to share information and create a community of people around a topic.

From this trend, many people have developed their own web pages to share their knowledge and experience with other people so that knowledge becomes public and help those who do not have as much knowledge.

However, for a page to have high interactions and visits from the public, the owner of the page must ensure that they comply with some recommendations that will increase the traffic of their page, such as:

  • Post frequently: This is because people are constantly looking for information and like to be up to date with the latest.
  • Respond to user comments and questions: This creates a link between the page owner and their visitors that makes them feel comfortable with this page. This also helps the owner create a community where everyone participates by contributing knowledge.

Note: This question is incomplete because the options are missing. Here are the options:

A. She must post new content on her website regularly.

B. She must increase the number of pay-per-click advertisements on her website.

C. She must regularly respond to user comments and questions.

D. She must use a secure payment gateway.

Learn more about vegan in: brainly.com/question/8708517

3 0
2 years ago
Curtis has been testing a new software package for the past two months. However, he decides not to switch and goes back to using
hodyreva [135]
Retro-active interference
8 0
3 years ago
A Windows user contacted the help desk with a problem that requires the technician to connect to the remote computer using Remot
djverab [1.8K]

Answer:

RDP port 3389 .

Explanation:

A Windows user has informed the helpdesk with such an issue that requires the operator to link to the remote server through Remote Assistance to access the user's screen with a very comprehensive and ambiguous error message. Almost any attempt made by the operator to link to the remote access concludes in a message that says that the connection has been denied. To make this link, the following protocol and the port number combinations must be enabled on the firewall of the remote connection.

6 0
3 years ago
Joe, a user, wants his desktop RAID configured to allow the fastest speed and the most storage capacity. His desktop has three h
kirill115 [55]

Answer:

A. 0

Explanation:

The technician should configure the RAID 0 for Joe.

RAID 0 also referred to as the striped volume or stripe set is configured to allow the fastest speed and the most storage capacity by splitting data evenly across multiple (at least two) disks, without redundancy and parity information.

Also, RAID 0 isn't fault tolerant, as failure of one drive will cause the entire array to fail thereby causing total data loss.

7 0
3 years ago
Where are you jaymann ive been looking for you
LuckyWell [14K]

Answer:

Explanation:

[[^hewoo I’m not em but thx for points

4 0
2 years ago
Read 2 more answers
Other questions:
  • ________ employees state-of-the-art computer software and hardware to help people work better together.
    15·1 answer
  • What is the simplest way to convert a decimal number in a binar one in c++?
    8·1 answer
  • Develop a program that will calculate the area and perimeter of a rectangle. The length and width can be given as constant.(LENG
    8·1 answer
  • Please help again if anyone doesn't mind
    15·1 answer
  • Which of the following recently developed technologies has NOT greatly increased the speed of information dissemination?
    13·2 answers
  • What is the purpose of using variables in programming?
    11·1 answer
  • 1. What does the word “processing” in data pro- cessing mean?
    13·2 answers
  • What is a good range for CPU usage to be considered running well?
    15·1 answer
  • 4. In computers, an integer can be represented by more than 8-bit, what is the largest positive integer that
    9·1 answer
  • Given a number n, for each integer i in the range from 1 to n inclusive, print one value per line as follows:
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!