[Haskell-cafe] [Parsec] A combinator to match between M and N times?

Udo Stenzel u.stenzel at web.de
Tue Aug 29 18:24:39 EDT 2006

Chris Kuklewicz wrote:
> Again, Parsec requires you to put "try" where you need it

I'm pretty sure it does, although this

> Udo Stenzel wrote:
> >countBetween 0 n p = p <:> countBetween   0   (n-1) p <|> return []

is a place where it's not needed in general.  You should know what
you're doing, though.  And I like ReadP better in general, exactly
because 'try' is a bit trippy.

C'est magnifique, mais ce n'est pas l'Informatique.
		-- Bosquet [on seeing the IBM 4341]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20060830/474ea4dc/attachment.bin

More information about the Haskell-Cafe mailing list