 <p>Ugh. As simple as this:</p> <pre><code>infixl 1 |&gt;= (|&gt;=) = flip fmap findFiles target = getDirectoryContents target |&gt;= filter (not . (=~ "[0-9]{8}\\.txt$")) |&gt;= filter (=~ "\\.txt$") &gt;&gt;= filterM doesFileExist &gt;&gt;= mapM canonicalizePath </code></pre>