Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Problem 4.6
- let isValid ((bnsman , bnsopt), (tcman, tcopt), (ppsman, ppsopt), ep) cb =
- let bns = Set.union bnsman bnsopt
- let tc = Set.union tcman tcopt
- let pps = Set.union ppsman ppsopt
- let bnstc = Set.intersect bns tc
- let bnspps = Set.intersect bns pps
- let tcpps = Set.intersect tc pps
- let allSets = Set.union (Set.union bnstc bnspps) tcpps
- let elective = Set.forall ep allSets
- isValidCourseGroup (bnsman, bnsopt) cb && isValidCourseGroup (tcman, tcopt) cb && isValidCourseGroup (ppsman, ppsopt) cb && Set.isEmpty ( Set.union (Set.union bnstc bnspps) tcpps ) && elective;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement