سؤال

Develop the predicate a-student? that returns true if the student has a gpa above 3.7, and use it to develop the function a-students?, which consumes a list of students, and produces a list of all the students who have gpa’s above 3.7. Use filter.

هل كانت مفيدة؟

المحلول

As the hint says - use filter in your a-students function:

(filter (lambda (student)
          (a-student? (student-GPA student)))
        list-of-students)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top