On Mon, 10 Jan 2011 01:44:26 +0100, z_axis <[email protected]> wrote:
picoSec :: IO Integer
picoSec = do
t <- ctPicosec `liftM` (getClockTime >>= toCalendarTime)
return t
:
How to write these pseudo-code elegantly ?
picoSec can be simplified to:
picoSec = ctPicosec `liftM` (getClockTime >>= toCalendarTime)
or:
picoSec = ctPicosec <$> (getClockTime >>= toCalendarTime)
Regards,
Henk-Jan van Tuyl
--
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe