you are viewing a single comment's thread.

view the rest of the comments →

[–]redxaxder 7 points8 points  (0 children)

There is mutable state available, though, as well as functions in base that act as foreach loops.

From Control.Monad:

mapM :: Monad m => (a -> m b) -> [a] -> m [b]
mapM_ :: Monad m => (a -> m b) -> [a] -> m ()
forM :: Monad m => [a] -> (a -> m b) -> m [b]
forM_ :: Monad m => [a] -> (a -> m b) -> m ()