Question: ;@problem 7 ( define ( three - criteria - courses c ) ( cond [ ( empty ? c ) empty ] [ else (
;@problem
define threecriteriacourses c
cond
empty c empty
else
local
define fnforcourse c ;
cons coursenumber cfnforloc coursedependents c
define fnforloc loc
cond
empty loc empty
else
cond
cons fnforcourse first locfnforloc rest loc
;helper function to filter the an odd number course list
define filteranodd c
filter lambda xodd x c
cond
and course cequal LOCcoursedependents c
filteranodd courseswcredits c
;helper function to filter the an odd number course list
;filter the list of course where the dependents is null, return this list.
and course list? map lambda xequal LOClast coursedependents x
allcoursenumbers c
My question: how to extract coursedependents value when the input course is a list of course???
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
