Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

prepare a function called reverselist that takes a list as an argument and reverses that list (you may not use the built-in function reverse). ex:
(reverselist '(a b c)) ==> (c b a)
(reverselist '((a) (b c)) ==> ((b c) (a))
prepare a function called remove-last that removes the last top-level occurrence of a given atom in a list:
(remove-last 'a '(a b a b a)) ==> (a b a b)
prepare a procedure called pairwise-sum that takes two lists of the same length and returns a list containing the sums of the corresponding elements in the two lists:
(pairwise-sum '(1 2 3) '(2 3 4)) ==> (3 5 7)
prepare as procedure called index that takes two arguments, an atom a and a list of atoms ls, and returns the zero-based index of a in ls. If a is not found, it should return -1.
(index 'a '(b c d a)) ==> 3
(index 'a '(b c d e)) ==> -1
prepare a function called reverse-all that takes a list as an argument and reverses that list. It should also reverse the elements in any nested lists (you may not use the built-in function reverse). ex:
(reverse-all '(a b c)) ==> (c b a)
(reverse-all '((a) (b c)) ==> ((c b) (a))
prepare a function find-largest that takes a list of numbers and returns the largest number in the list.
(find-largest '(2 4 8 5)) ==> 8
prepare a function find-largest-all that takes a list of numbers (with nested lists of numbers) and returns the largest number in the list.
(find-largest-all '(2 (4) (8 5))) ==> 8
prepare a function palindrome? that takes a list of atoms and tests to see if it is a palindrome (the reverse of the list is the same as the list).
(palindrome? '(a b c d)) ==> #f
(palindrome? '(a b b a)) ==> #t

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9129523

Have any Question?


Related Questions in Computer Engineering

Your task is to implement the simple elevator in python

Your task is to implement the simple elevator in Python using classes. The default strategy is the simple "start at the bottom, go to the top, then go to the bottom". Can you write a better strategy one that is more effi ...

A compare the properties of cpu registers with the main

(a) Compare the properties of CPU registers with the main memory in MIPS.  (b) Describe the purpose of the stack pointer ($sp) for procedure calling. (c) What is a "basic block" and how is it used by a compiler? (d) Ther ...

Serializationdesign a verilog module to convert a 64-bit

Serialization Design a Verilog module to convert a 64-bit data signal with periodic timing (eight-cycle period) into a series of eight-bit signals with periodic timing (one-cycle period). You must store the input data, a ...

In powerpoint what is beneficial about the usage or video

In Powerpoint, what is beneficial about the usage or Video, Audio, Animation, and Photos with Effects during presentation and work. What are some useful tools you found that would improve performance?

A street vendor is asking people to play a simple game you

A street vendor is asking people to play a simple game. You roll a pair of dice. If the sum on the dice is 10 or higher, you win $10. If you roll a pair of 1's, you win $59. Otherwise you lose $5. If the random variable ...

Question suppose you are planning a party for 10 friends

Question : Suppose you are planning a party for 10 friends. You decide to make sandwiches to serve at the party, no more than one sandwich per person. Seven of your friends say they want turkey. Five say they want roast ...

What is the supply curve how do you apply the law of supply

What is the supply curve, how do you apply the law of supply in economics?

Assignment 1 multi-touch screens vs mouse-driven screensthe

Assignment 1: Multi-Touch Screens vs. Mouse-Driven Screens The following resources may be helpful when completing this assignment. • Dearden, A. (2008). User-Centered Design Considered Harmful • Norman, D. (2007-2010). A ...

Question responsive frameworks and libraries provide

Question : Responsive frameworks and libraries provide convenience when creating a modern website. Discuss at least three design options, such as hiding content or layout changes, that would be beneficial for a responsiv ...

Diacussion 1 how would one distinguish between an

Diacussion: 1) How would one distinguish between an organizational weekness and threat to the organization? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow the APA for ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As