so I have a set of facts:
course(cs61, "intro to cs")
...
course(cs62b, "data structure")
...
grade(adam, cs61, spring11, "A")
...
grade(chrisitian, cs61, fall2010, "A-")
I need to define a predicate good_standing(Student)
to determine whether the Student
got A
in every class he took. I must use 2 different approaches:
- use
setof/3
- use NAF
on the 1st. I have tried to figure out get Result_list
: the set of students that got A from every class he took. and then call member(Student, Result_list)
. But I don't know what to get the Result_list
since the syntax is a bit strange to me.