Just a synchronization method for my beginner's Haskell code