[Haskell-cafe] Lazy HTML parsing with HXT, HaXML/polyparse, what else?

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Mon May 14 11:36:09 EDT 2007


Henning Thielemann <lemming at henning-thielemann.de> wrote:

> >     exactly 0 p = return []
> >     exactly n p = do x <- p
> >                      xs <- exactly (n-1) p
> >                      return (x:xs)
> 
> Is there a difference between 'exactly' and 'replicateM' ?

With this definition, clearly not.  But when rewritten to use lazy
application, there is certainly a pragmatic difference in where the
bottoms (if any) are located in the result.

Regards,
    Malcolm


More information about the Haskell-Cafe mailing list