X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=src%2Ftask6%2Ftask6-monad.hs;h=50aca558fa21e9d4a6c4f40cc58d341458d630e1;hb=b8d6df7a5119aa0f5c919677aef0b1bb97269f7c;hp=df52ed1410b40a343846705d582028d381b30d7d;hpb=71da18e8360633ccc00b74ef62fd1fe60a3b9cda;p=summerofcode2018soln.git diff --git a/src/task6/task6-monad.hs b/src/task6/task6-monad.hs index df52ed1..50aca55 100644 --- a/src/task6/task6-monad.hs +++ b/src/task6/task6-monad.hs @@ -66,10 +66,10 @@ execGroups (State st) = fst $ st M.empty -- including all the friendships is just a monadic fold mergeFriendships :: [(Name, Name)] -> State () -mergeFriendships pairs = foldM_ includeFriendshipM () pairs +mergeFriendships pairs = foldM_ includeFriendship () pairs -includeFriendshipM :: () -> (Name, Name) -> State () -includeFriendshipM _ (thisPerson, thatPerson) = do +includeFriendship :: () -> (Name, Name) -> State () +includeFriendship _ (thisPerson, thatPerson) = do include thisPerson include thatPerson thisExemplar <- exemplar thisPerson