For these problems, you must use pure functional scheme. That is: You may not use a functions like set! whose name ends with '!'. You may not use do. All repetition must be via explicit recursion or the recursion implicit in map or similar functions. You may, however, use define – in fact you must use it. You may define additional helper functions.   Be sure to test your definitions using some implementation of the “R5RS” scheme standard, preferably the one in Racket – see Pages > scheme_links.html for a discussion of how to get it. (It is what I have been using in lecture.) If you use the Racket implementation of scheme, be sure that the language is set to R5RS – the name “R5RS” should appear at the bottom left corner of the window, and not something like “advanced student” or “Determine language from source”. Define the function (doubleBubbleLst lst). This function should resolve to a list of sublists, where each sublist holds a single element from lst and all sublists from lst  are also bubbled, so that every list and sublist has no atoms. This is the deep  recursion version of bubbleLst. For example: (doubleBubbleLst '(1 2 (3 4)) ) resolves to '((1) (2) (( (3) (4) ))).

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Computer Science

For these problems, you must use pure functional scheme. That is:

  • You may not use a functions like set! whose name ends with '!'.

  • You may not use do. All repetition must be via explicit recursion or the recursion implicit in map or similar functions.

  • You may, however, use define – in fact you must use it.

  • You may define additional helper functions.

 

Be sure to test your definitions using some implementation of the “R5RS” scheme standard, preferably the one in Racket – see Pages > scheme_links.html for a discussion of how to get it. (It is what I have been using in lecture.) If you use the Racket implementation of scheme, be sure that the language is set to R5RS – the name “R5RS” should appear at the bottom left corner of the window, and not something like “advanced student” or “Determine language from source”.

Define the function (doubleBubbleLst lst). This function should resolve to a list of sublists, where each sublist holds a single element from lst and all sublists from lst  are also bubbled, so that every list and sublist has no atoms. This is the deep  recursion version of bubbleLst.

For example: (doubleBubbleLst '(1 2 (3 4)) ) resolves to '((1) (2) (( (3) (4) ))).

 
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY