SlideShare a Scribd company logo
1 of 1
Download to read offline
Code the problem in scheme. Make use you test it and follows the requirement:
0. Write the following function using call/cc and a single helper function that uses "normal"
recursion instead of tail recursion. xindex takes an atom and a list containing sublists. The output
list should be the same as the input list except that any sublist (including the main list) that
contains the given atom should be emptied of all contents (atoms, lists, etc.), and instead, the
only content of that sublist should be the index of the first occurrence of the atom in that list.

More Related Content

More from akdavinderhosiery

More from akdavinderhosiery (20)

Click the icon to view the data for the four projects Fill in the tabl.pdf
Click the icon to view the data for the four projects Fill in the tabl.pdfClick the icon to view the data for the four projects Fill in the tabl.pdf
Click the icon to view the data for the four projects Fill in the tabl.pdf
 
Click on the Nash Equilibria (one or more) of this game (click on the.pdf
Click on the Nash Equilibria (one or more) of this game (click on the.pdfClick on the Nash Equilibria (one or more) of this game (click on the.pdf
Click on the Nash Equilibria (one or more) of this game (click on the.pdf
 
Click the icon to view the interest and annuity table for discrete com.pdf
Click the icon to view the interest and annuity table for discrete com.pdfClick the icon to view the interest and annuity table for discrete com.pdf
Click the icon to view the interest and annuity table for discrete com.pdf
 
Click and drag the terms on the left to fill in the blanks in the sent (1).pdf
Click and drag the terms on the left to fill in the blanks in the sent (1).pdfClick and drag the terms on the left to fill in the blanks in the sent (1).pdf
Click and drag the terms on the left to fill in the blanks in the sent (1).pdf
 
Click the icon to view the interest factors for discrete compounding w (1).pdf
Click the icon to view the interest factors for discrete compounding w (1).pdfClick the icon to view the interest factors for discrete compounding w (1).pdf
Click the icon to view the interest factors for discrete compounding w (1).pdf
 
Click here to access StatKey- Round your answer for the intercept to o (1).pdf
Click here to access StatKey- Round your answer for the intercept to o (1).pdfClick here to access StatKey- Round your answer for the intercept to o (1).pdf
Click here to access StatKey- Round your answer for the intercept to o (1).pdf
 
Classify each description according to the correct spinal cord structu.pdf
Classify each description according to the correct spinal cord structu.pdfClassify each description according to the correct spinal cord structu.pdf
Classify each description according to the correct spinal cord structu.pdf
 
Classifying Cash Flows Identify whether each of the following would be.pdf
Classifying Cash Flows Identify whether each of the following would be.pdfClassifying Cash Flows Identify whether each of the following would be.pdf
Classifying Cash Flows Identify whether each of the following would be.pdf
 
Classification- The following items are part of the cytoskeleton- Resp.pdf
Classification- The following items are part of the cytoskeleton- Resp.pdfClassification- The following items are part of the cytoskeleton- Resp.pdf
Classification- The following items are part of the cytoskeleton- Resp.pdf
 
Classifying Intangible Costs on the Balance Sheet The adjusted trial b.pdf
Classifying Intangible Costs on the Balance Sheet The adjusted trial b.pdfClassifying Intangible Costs on the Balance Sheet The adjusted trial b.pdf
Classifying Intangible Costs on the Balance Sheet The adjusted trial b.pdf
 
Classification- The following items are organelles found in animal cel (1).pdf
Classification- The following items are organelles found in animal cel (1).pdfClassification- The following items are organelles found in animal cel (1).pdf
Classification- The following items are organelles found in animal cel (1).pdf
 
Classification- The following are basic building blocks of biopolymers.pdf
Classification- The following are basic building blocks of biopolymers.pdfClassification- The following are basic building blocks of biopolymers.pdf
Classification- The following are basic building blocks of biopolymers.pdf
 
Clara did very well on her Biology midterm- The Biology midterm scores.pdf
Clara did very well on her Biology midterm- The Biology midterm scores.pdfClara did very well on her Biology midterm- The Biology midterm scores.pdf
Clara did very well on her Biology midterm- The Biology midterm scores.pdf
 
Clarice- an 11 year-old girl- was eating her school dinner one lunchti.pdf
Clarice- an 11 year-old girl- was eating her school dinner one lunchti.pdfClarice- an 11 year-old girl- was eating her school dinner one lunchti.pdf
Clarice- an 11 year-old girl- was eating her school dinner one lunchti.pdf
 
choose the one correct answer - 33- A good surveillance system shoul.pdf
choose the one correct answer -   33- A good surveillance system shoul.pdfchoose the one correct answer -   33- A good surveillance system shoul.pdf
choose the one correct answer - 33- A good surveillance system shoul.pdf
 
Cladogram or phylogram- What do the colors represent- virustype SARS-.pdf
Cladogram or phylogram- What do the colors represent- virustype  SARS-.pdfCladogram or phylogram- What do the colors represent- virustype  SARS-.pdf
Cladogram or phylogram- What do the colors represent- virustype SARS-.pdf
 
CIS105 (1-7) Build a community-area crime report showing each incident.pdf
CIS105 (1-7) Build a community-area crime report showing each incident.pdfCIS105 (1-7) Build a community-area crime report showing each incident.pdf
CIS105 (1-7) Build a community-area crime report showing each incident.pdf
 
Circled nodes (there are two on this gene tree) represent gene duplica.pdf
Circled nodes (there are two on this gene tree) represent gene duplica.pdfCircled nodes (there are two on this gene tree) represent gene duplica.pdf
Circled nodes (there are two on this gene tree) represent gene duplica.pdf
 
Cipher mechanics 1- monoalphabetic substitution- The small- Greek-spea.pdf
Cipher mechanics 1- monoalphabetic substitution- The small- Greek-spea.pdfCipher mechanics 1- monoalphabetic substitution- The small- Greek-spea.pdf
Cipher mechanics 1- monoalphabetic substitution- The small- Greek-spea.pdf
 
Choose the correct statement- A- Growth in average hours per work incr.pdf
Choose the correct statement- A- Growth in average hours per work incr.pdfChoose the correct statement- A- Growth in average hours per work incr.pdf
Choose the correct statement- A- Growth in average hours per work incr.pdf
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 

Code the problem in scheme- Make use you test it and follows the requi.pdf

  • 1. Code the problem in scheme. Make use you test it and follows the requirement: 0. Write the following function using call/cc and a single helper function that uses "normal" recursion instead of tail recursion. xindex takes an atom and a list containing sublists. The output list should be the same as the input list except that any sublist (including the main list) that contains the given atom should be emptied of all contents (atoms, lists, etc.), and instead, the only content of that sublist should be the index of the first occurrence of the atom in that list.