Answered step by step
Verified Expert Solution
Question
1 Approved Answer
scheme file #lang scheme ; Scheme Poject test module ; YOU SHOULD NOT MODIFY THIS FILE! If one of your functions does not work ;
scheme file
#lang scheme
; Scheme Poject test module
; YOU SHOULD NOT MODIFY THIS FILE! If one of your functions does not work
; comment out the call to the test module in your code.
; Your code will be tested with a similar module
provide testremovenexttolast
provide testmanhattan
provide testremovedups
provide testdeepsearch
provide testinorder
provide testtreeexists
provide testevalpoly
provide testgetpolyfun
display "Summer Test Cases"newline
define testremovenexttolast
lambda x
begin
display "Question : removenexttolast:
write x l a s x tdisplay &
write x o n x e
newline
define testmanhattan
lambda x
begin
display "Question : manhattan:
write x display &
write x display &
write x
newline
define testremovedups
lambda x
begin
display "Question : removedups:
write x w o r k sdisplay &
write x p p p p e e e r r r r r f f f f f e e e e c c c t t t tdisplay &
write x T T T T T T T T T T T
newline
define testdeepsearch
lambda x
begin
display "Question : deepsearch
write x display &
write x display &
write x display &
write x display &
write x a b c d eedisplay &
write x
newline
define tree
define tree
define testinorder
lambda x
begin
display "Question : inorder:
write x treedisplay &
write x tree
newline
define testtreeexists
lambda x
begin
display "Question : treeexists:
write x treedisplay &
write x treedisplay &
write x treedisplay &
write x tree
newline
define testevalpoly
lambda x
let poly
poly
poly
begin
display "Question a: evalpoly: newline
display Poly:
write x polydisplay &
write x polydisplay &
write x poly
newline
display Poly:
write x polydisplay &
write x polydisplay &
write x poly
newline
display Poly:
write x polydisplay &
write x polydisplay &
write x poly
newline
define testgetpolyfun
lambda x
let poly
poly
poly
let
fx poly
fx poly
fx poly
begin
display "Question b: getpolyfun:
write x polydisplay &
write x poly
newline
display f:
write fdisplay &
write fdisplay &
write fnewline
display f:
write fdisplay &
write fdisplay &
write fnewline
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started