Write a new function, traverseDirectoryIO that has the type:

traverseDirectoryIO :: FilePath -> (FilePath -> IO a) -> IO [a]

This function should behave like traverseDirectory' but should accept a function returning an IO action, rather than a value.

Hint 1

Some high level hint text

Hint 2

Some more detailed hint text

Hint 3

Even more detailed hint text


A complete solution for the exercise