[Haskell-cafe] Line noise
Bulat Ziganshin
bulat.ziganshin at gmail.com
Mon Sep 22 15:12:43 EDT 2008
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 at gmail.com
More information about the Haskell-Cafe
mailing list