Question: Use SCHEME lang htdp . org racket - lang.org drRacket IDE Use Teaching language Advanced student Must show attempt to execute Write documentation for the

Use SCHEME lang
htdp.org
racket-lang.org
drRacket IDE
Use Teaching language
Advanced student
Must show attempt to execute
Write documentation for the following code then code:
4-Function Calculator(mycalc no op no)
Do in a single line of code
Re-implement reverse function for arbitrary list
no "for" or "loop" function
use recursion instead
use "cons" and "append" function
Count no of "e" in a arbitrary list
list example
(list head, tail1, tail2, tail 3,dots )= populated list
(list)= empty list
Notes for the HW:
Lambda's job is to construct functions.
Method of terminating recursion:
Are we there yet?
Least amount of work?
Who can I get to do the rest of the work?
Figure out where to locate head of list and its proceeding tails
Restricted form of Scheme only has 1 operation (name parms)
(name of the function, parameter of function)
Define lambda: Use explicit use of lambda
scheme has functions:
+-?**?
(list) car cdr cons append if
car gets the head
cdr gets the tail
cons adds an element to front of list
append appends the list
Scheme lang example used in class:
Sum Function:
Terminates when there are no more numbers to add
(define mysum
(lambda(x)(
(if(equal?x(list))0
(+(carx)(mysum(cdrx)))))
square function example in scheme
((lambda({:(x)(**))5)
=25
pass 5 into the lambda (x) function which performs (**) which are a prefix function
 Use SCHEME lang htdp.org racket-lang.org drRacket IDE Use Teaching language Advanced

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!