
4 Feb
2007
4 Feb
'07
2:29 p.m.
C.M.Brown wrote:
I've found that:
let (answer2, remainder) = parseAnswer (force answer)
where
force :: Eq a => a -> a force x = if x==x then x else x
Seems to do the trick.
...but I'd advise against using it. If the power fails at the right time, you're left with no file at all. It's probably better to simply write a new file and rename it over the old one at the end. That is safer and doesn't require you to jump through hoops. If you can't afford the disk space to do that, you want a full-blown database anyway. -Udo -- echo '[dO%O+38%O+PO/d0<0]Fi22os0CC4BA64E418CE7l0xAP'|dc