[Haskell-beginners] Mapping inside State
martin
martin.drautzburg at web.de
Mon Mar 31 16:07:20 UTC 2014
Hello all,
I found myselft writing this ugly piece of code
silenceAll :: TI -> State (M.Map CH StringState,[DtzEvent]) TI
silenceAll t =
silence t 0
>> silence t 1
>> silence t 2
>> silence t 3
>> silence t 4
>> silence t 5
>> silence t 6
>> return t
because I couldn't figure out how to map (silence t) over [0..6]. What is the standard way of doing this?
More information about the Beginners
mailing list