Advertisement
Guest User

Untitled

a guest
Oct 6th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.61 KB | None | 0 0
  1. // Problem 4.6
  2. let isValid ((bnsman , bnsopt), (tcman, tcopt), (ppsman, ppsopt), ep) cb =
  3.     let bns = Set.union bnsman bnsopt
  4.     let tc = Set.union tcman tcopt
  5.     let pps = Set.union ppsman ppsopt
  6.     let bnstc = Set.intersect bns tc
  7.     let bnspps = Set.intersect bns pps
  8.     let tcpps = Set.intersect tc pps
  9.     let allSets = Set.union (Set.union bnstc bnspps) tcpps
  10.     let elective = Set.forall ep allSets
  11.     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