Online algorithms revisited

Online algorithms are generalised and have Haddock documentation