27 Mar
2003
27 Mar
'03
4:12 p.m.
timer f a = do t1 <- get current time evaluate (f a) t2 <- get current time return (different in t2 and t1)
where evaluate is from Control.Exception. could someone tell me how evaluate compares to seq and deepSeq?
The documentation explains the difference, but it's a bit cryptic. Informally: 'evaluate e' is an IO action that, when performed, forces e to weak-head normal form. It's a kind of seq that you can use in the IO monad. Cheers, Simon
8555
Age (days ago)
8555
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow