Question
write following scheme function and make sure it works in Dr.Racket selectN - takes as input an integer N. It then builds and returns a
write following scheme function and make sure it works in Dr.Racket
selectN - takes as input an integer N. It then builds and returns a "select" function based on N. The "select" function that is produced (by your function selectN) would have the property that it takes as input a list, and returns the same list with the first N elements removed. For example, if selectN was called as follows:
(selectN 3) a function would be produced that takes as input a list and returns the list with the first 3 elements removed from that list. For example, if the original call had been made as follows:
(define Last (selectN 3)) then the produced function C would behave as follows:
(Last '(4 8 2 9 -1 13)) *** would return (9 -1 13)
(Last '(-23-48917)) ***wouldreturn(8917) Your task is just to write selectN.
Of course, selectN should work for ANY input integer, not just 3.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started