
21 Feb
2007
21 Feb
'07
5:01 p.m.
On 2007-02-21, Joe Thornber
On 2007-02-10, Peter Berry
wrote: Prelude> putStrLn $ concatMap (flip (++)"\n") $ map show $ [(x,y,(&&) x y) |x <- [True,False],y <- [True,False]] This can be simplified slightly to:
Prelude > putStrLn . unlines . map show $ [(x, y, x && y) | x <- [True, False], y <- [True, False]]
This can be further simplified to: putStrLn $ unlines [show (x, y, x && y) | x <- [True, False], y <- [True, False]] -- Met vriendelijke groet, Henk-Jan van Tuyl -- http://Van.Tuyl.eu/ -- Using Opera's revolutionary e-mail client: https://secure.bmtmicro.com/opera/buy-opera.html?AID=789433