; File: prerequisites.scm ;Given a course find all the prerequisities (define courses '((cs111 "Computing I" "none") (cs112 "Computing II" '(cs111)) (cs115 "Discrete MathI" "none") (cs220 "comp Architecture" '(cs112)) (cs213 "DataStruct" '(cs112 cs115)) (cs311 "Theory of Computation" '(cs213)) (cs325 "Operating Systems" '(cs220)) (cs229 "Data Base" '(cs101)) ) ) (define (start) (let ((c 0)) (display "\nYour course(q for quit)=") (set! c (read)) (cond ((equal? c 'q) 'bye) ((not (member c (map car courses)))(display "not a course")(start)) (#t (display (find-prereq c)) (start)) ))) (define (find-prereq c)(assoc c courses))