<p dir="ltr"><br>
Le 31 mars 2014 18:07, "martin" <<a href="mailto:martin.drautzburg@web.de">martin.drautzburg@web.de</a>> a écrit :<br>
><br>
> Hello all,<br>
><br>
> I found myselft writing this ugly piece of code<br>
><br>
> silenceAll  :: TI -> State (M.Map CH StringState,[DtzEvent]) TI<br>
> silenceAll  t =<br>
Cut<br>
><br>
> because I couldn't figure out how to map (silence t) over [0..6]. What is the standard way of doing this</p>
<p dir="ltr">As said, mapM_ is the standard way to do that .<br>
How could you have found this for yourself ? The recommended way would be to use hoogle to search for the type signature you wish : <br>
(Monad m) => (a -> m b) -> [a] -> m ()<br>
mapM_ would be among the first results.</p>
<p dir="ltr">-- <br>
Jedaï</p>