From 8fbaf4ced8d0fec4a591afad9a2e0fdae08a9e9a Mon Sep 17 00:00:00 2001 From: sdwoodbury Date: Tue, 7 Oct 2014 23:36:20 -0400 Subject: [PATCH] supposedly prints out the good list of lists --- assignment3.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assignment3.hs b/assignment3.hs index b6f6154..dcdc9f3 100644 --- a/assignment3.hs +++ b/assignment3.hs @@ -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"