Whoops, the definition of chainl1 should of course be
chainl1 p op = p >>= rest
where rest x = do f <- op
y <- p
rest (f x y)
+++ return x
i.e. rest (f x y), rather than return (f x y).
Maybe I should write a test suite too, while I'm at it. Is there any
specific location in the cvs tree where test suites should be put?