Remove an unused parameter.
Use mapM_ instead of performing a manual recursion.