
10 Jan
2011
10 Jan
'11
6:25 a.m.
On Mon, 10 Jan 2011 01:44:26 +0100, z_axis
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 --