
22 Sep
2008
22 Sep
'08
3:12 p.m.
Hello Luke, Monday, September 22, 2008, 11:00:12 PM, you wrote:
mapM_ (\(n,v) -> putStrLn $ "[" ++ show n ++ "] = " ++ show v) (zip [0..] vs)
forM_ (zip [0..] vs) $ \(n,v) -> putStrLn $ "[" ++ show n ++ "] = " ++ show v
for (zip [0..] vs) $ \(n,v) -> do putStrLn $ "[" ++ show n ++ "] = " ++ show v ... it's rather close to C/Pascal/... loops although it will be great to have more sugar here -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com