Advertisement
Guest User

Untitled

a guest
Oct 6th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.97 KB | None | 0 0
  1. //Problem 4.7
  2. let testMap = Map.ofList [(55, ("Major BNS course", 45)) ;
  3.                     (45, ("Major TC course", 45)) ;
  4.                     (35, ("Major PPS course", 45)) ;
  5.                     (25, ("Major elective BNS course", 45)) ;
  6.                     (15, ("Not so important course", 45)) ];;
  7.  
  8. let testcs = Set.ofList [55; 45; 35; 25];;
  9.  
  10. //Basic Natural Science Course Group
  11. let testBNSman = Set.ofList [55];;
  12. let testBNSopt = Set.ofList [0];;
  13. let testBNS = (BNSman,BNSopt);;
  14.  
  15. //Technological Core Course Group
  16. let testTCman = Set.ofList [45];;
  17. let testTCopt = Set.ofList [5];;
  18. let testTC = (TCman,TCopt);;
  19.  
  20. //Project Professional Skill Course Group
  21. let testPPSman = Set.ofList [35];;
  22. let testPPSopt = Set.ofList [10];;
  23. let testPPS = (PPSman,PPSopt);;
  24.  
  25. //Elective
  26. let Elective courseNo = courseNo%5 = 0;;
  27.  
  28. let testflag = (testBNS, testTC, testPPS, Elective);;
  29.  
  30.  
  31. let checkPlan cs flag cb = sumECTS testcs testMap = 180 && sumECTS testBNS testMap = 45
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement