interactN :: Int -> (String -> String) -> IO ()

interactN n f =
    do  input <- replicateM n getLine
        putStr (f (join input))

{- setting buffering before doing an interaction -}
interactN :: Int -> (String -> String) -> IO ()
interactN n f =
    do  input <- replicateM n getLine
        putStr (f (join input))

{- setting buffering before doing an interaction -}
interactN n f =
    do  input <- replicateM n getLine
        putStr (f (join input))

{- setting buffering before doing an interaction -}