Consider following example:

```
safeMapM f xs = safeMapM' xs []
    where safeMapM' []     acc = return $ reverse acc
          safeMapM' (x:xs) acc = do y <- f x
                                    safeMapM' xs (y:acc)

mapM return largelist      -- Causes stack space overflow on large lists
safeMapM return largelist  -- Seems to work fine

```

Using `mapM` on large lists causes a stack space overflow while `safeMapM` seems to work fine (using GHC 7.6.1 with `-O2`). However I was not able to find a function similar to `safeMapM` in the Haskell standard libraries.

Is it still considered good practice to use `mapM` (or `sequence` for that matter)?  

If so, why is it considered to be good practice despite the danger of stack space overflows?  

If not which alternative do you suggest to use?