Skip to content

Commit

Permalink
supposedly prints out the good list of lists
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwoodbury committed Oct 8, 2014
1 parent b87756b commit 8fbaf4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assignment3.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ main =
if checkmod students grpsize
then
do
let a = combinations (students `div` grpsize) [1..students]
b = getUnique a
if (length b) < 8 * (students `div` grpsize)
let a = combinations (students `div` grpsize) [1..students] --gets combinations of maximum group size
b = getUnique a --gets the combinations of maximum group size where no one works together more than once
if (length b) < 8 * (students `div` grpsize) --fail
then putStrLn "it is impossible to group all the students in maximum group sizes for every assignment"
else

mapM_ putStrLn b --prints out the unique combinations
else
do
putStrLn "Cannot pair up " ++ (show students) ++ " students into groups of " ++ show(grpsize) ++ " across eight assignments"
Expand Down

0 comments on commit 8fbaf4c

Please sign in to comment.