Permalink
Browse files

Use replicateM_ instead of foreach [1..5] $ \_ ->

  • Loading branch information...
1 parent b9e58fb commit 25456fd0d1d428c9206a34cec352be559229abf3 @kfish committed Nov 13, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/cairo-appbase.hs
View
@@ -5,6 +5,7 @@
-- This code is in the public domain.
--
+import Control.Monad (replicateM_)
import qualified System.Glib.Types as GTypes
import qualified Graphics.UI.Gtk as G
import qualified Graphics.UI.Gtk.Glade as Glade
@@ -221,9 +222,9 @@ example1 = do
drawCircle 2 2 3
-- a bunch of rectangles
keepState $
- foreach [1 .. 5] $ \ _ ->
- do drawRectangle 0 1 2 3
- C.rotate (pi/8)
+ replicateM_ 5 $ do
+ drawRectangle 0 1 2 3
+ C.rotate (pi/8)
-- some cute stuff
thought
apple

0 comments on commit 25456fd

Please sign in to comment.