The reply I gave before might be more helpful if you consider the fact that

    a >> b >> c 

is equivalent to

    do a
       b
       c

You can then use

    forM_ [1..4] (\_ -> putStrLn "Test")

What this does is,

    1. map (\_ -> putStrLn "Test") on [1..4]
    2. Use sequence_ to combine those operations

The even shorter way is replicateM_ which works like replicate from Data.List

On 2 May 2015 at 01:39, Marcin Mrotek <marcin.jan.mrotek@gmail.com> wrote:
Ah, sorry, I forgot about replicateM_.

Best regards,
Marcin Mrotek
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners



--
Regards

Sumit Sahrawat