Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 2 Ma fil king Procedures- Define the following five scheme procedures and store them in a single scheme le name yourlastnamel.rkt. Defining helper procedures

image text in transcribed
Part 2 Ma fil king Procedures- Define the following five scheme procedures and store them in a single scheme le name "yourlastnamel.rkt". Defining helper procedures may be useful in solving some of these problems. o include your name as comments at the beginning of the file. (15x4-60 points) double7 - a function which expects as argument a list of integers, and return a list with all 7s doubled. You may assume there is no sublist. (double7 (1 2717 72 7 3) (1 2 14 17 72 143) - a function which expects as argument a list of integers, and return a list with all 7s doubled, followed by the symbol bond, including those in sub-list. (doubleAl17 '(7 5 (3 7 (12 77 7)))) (7 bond 5 (3 7 bond (12 77 7 bond))) 3. merge - a function which expects two sorted lists of numbers and returns a single sorted list containing exactly the same elements as the two argument lists together: (merge '(123)(456)) (123456) (merge (1 3 5) (2 4 6)) (123456) 4. interleave - a fiunction which expects as arguments two lists L1 and L2, and returns a single list obtained by choosing elements alternately, first from L1 and then from L2. When either L1 or L2 runs out, it takes the remaining elements from the other list, so that the elements of the result are exactly the elements of the t argument lists taken together. (interleave '(1 2 3) '(a b c)) (1 a 2 b 3 c) (interleave (1 2 3) (a b c def) (I a 2 b3cdef)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions