Question: Common Lisp. Plz do all question in section2. Plz Question 1-16 C SCI 316 (Kong): Lisp Assignment 5 Solutions to these problems are to be

Common Lisp. Plz do all question in section2. Plz
Question 1-16  Common Lisp. Plz do all question in section2. Plz Question 1-16
C SCI 316 (Kong): Lisp Assignment 5 Solutions to these problems are
to be submitted no later than Sunday, 10/28. See page 5 for
instructions on how to submit. SECTION 1 (Nonrecursive Preliminary Problems) The three
problems in this section (A-C) do not carry direct credit, but are

C SCI 316 (Kong): Lisp Assignment 5 Solutions to these problems are to be submitted no later than Sunday, 10/28. See page 5 for instructions on how to submit. SECTION 1 (Nonrecursive Preliminary Problems) The three problems in this section (A-C) do not carry direct credit, but are intended to help you solve problems 1-3 in Part I of Section 2. Note that there may be questions on exam 1 or on the final exam that are of a similar nature to A -C. Your solutions to problems A - C must not be recursive. You can test your solutions to these three problems on venus or euclid: Functions INDEX, MIN-FIRST, and SSORT with the stated properties are predefined for you when you start Lisp using cl on those machines A. INDEX is a function that is already defined on euclid and venus. If N is any positive integer and L is any list, then (INDEX N L) returns the Nth element of L if N does not exceed the length of L; if N exceeds the length of the list L, then (INDEX N L) returms the symbol ERROR. For example, Complete the following definition of a function MY-INDEX without making further calls of INDEX and without calling MY-INDEX recursively, in such a way that if N is any integer greater than 1 and L is any nonempty list then (MY-INDEX N L) is equal to (INDEXNL) (INDEX 3 "(AS (A S) (A) D))-> (A S) (INDEX 6 TA S (A S) (A) D))-> ERROR (defun my-index (N L) (let ((x (index N 1) (cdr L)))) Note: You should not have to call any functions.] B. MIN-FIRST is a function that is already defined on euclid and venus; if L is any nomernpry listof real numbers then (MIN-FIRST L) is a list whose CAR is the minimum of the numbers in L and whose CDR is the list obtained when the first occurrence of that value is removed fromT. (MIN-FIRST L) is "L with the first occurrence of its minimum value moved to the (Thus For example, (MIN-FIRST 0311035)(0311035) (MIN-FIRST 43110350302))(04311350302). ng definition of a function MY-MIN-FIRST without making further calls of MIN-FIRST and without calling MY-MIN-FIRST recursively, in such a way that if L is any list of at least thwo real numbers then (MY-MIN-FIRST L) is equal to (MIN-FIRST L). (dofun my-min-first (L) (let ((x (min-first (edL)))) There are two cases: (car L) may or may not be s (car X).] If you have aimeality wih hee problems, yos are escearaged to come to see me is ay office, eilher durieg my office hour or uf yeu casnet come at that sec) by appelatecet. Osestions abeat these preblems that are e malled to me will not be anwered etore the subuisslon desdlise, Lisp Assignment 3: Page I of 5 C SCI 316 (Kong): Lisp Assignment 5 Solutions to these problems are to be submitted no later than Sunday, 10/28. See page 5 for instructions on how to submit. SECTION 1 (Nonrecursive Preliminary Problems) The three problems in this section (A-C) do not carry direct credit, but are intended to help you solve problems 1-3 in Part I of Section 2. Note that there may be questions on exam 1 or on the final exam that are of a similar nature to A -C. Your solutions to problems A - C must not be recursive. You can test your solutions to these three problems on venus or euclid: Functions INDEX, MIN-FIRST, and SSORT with the stated properties are predefined for you when you start Lisp using cl on those machines A. INDEX is a function that is already defined on euclid and venus. If N is any positive integer and L is any list, then (INDEX N L) returns the Nth element of L if N does not exceed the length of L; if N exceeds the length of the list L, then (INDEX N L) returms the symbol ERROR. For example, Complete the following definition of a function MY-INDEX without making further calls of INDEX and without calling MY-INDEX recursively, in such a way that if N is any integer greater than 1 and L is any nonempty list then (MY-INDEX N L) is equal to (INDEXNL) (INDEX 3 "(AS (A S) (A) D))-> (A S) (INDEX 6 TA S (A S) (A) D))-> ERROR (defun my-index (N L) (let ((x (index N 1) (cdr L)))) Note: You should not have to call any functions.] B. MIN-FIRST is a function that is already defined on euclid and venus; if L is any nomernpry listof real numbers then (MIN-FIRST L) is a list whose CAR is the minimum of the numbers in L and whose CDR is the list obtained when the first occurrence of that value is removed fromT. (MIN-FIRST L) is "L with the first occurrence of its minimum value moved to the (Thus For example, (MIN-FIRST 0311035)(0311035) (MIN-FIRST 43110350302))(04311350302). ng definition of a function MY-MIN-FIRST without making further calls of MIN-FIRST and without calling MY-MIN-FIRST recursively, in such a way that if L is any list of at least thwo real numbers then (MY-MIN-FIRST L) is equal to (MIN-FIRST L). (dofun my-min-first (L) (let ((x (min-first (edL)))) There are two cases: (car L) may or may not be s (car X).] If you have aimeality wih hee problems, yos are escearaged to come to see me is ay office, eilher durieg my office hour or uf yeu casnet come at that sec) by appelatecet. Osestions abeat these preblems that are e malled to me will not be anwered etore the subuisslon desdlise, Lisp Assignment 3: Page I of 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!