|
|
|
|
|
by mifrai
4924 days ago
|
|
and since Haskell has non-strict evaluation, we don't have to worry about generating too much data (list of inexistant files) for nothing. Be careful here. Because you're in the IO monad, the entire list of files will always be computed first (ie. doesFileExist will be called for every file given). Non-strict doesn't really buy you much here. The "expensive" operation here will always be executed. At most, you're avoiding converting some list-consing-thunks to a list. |
|