unison icon indicating copy to clipboard operation
unison copied to clipboard

Implement "give back as needed" version of `Pattern.many`

Open pchiusano opened this issue 3 years ago • 0 comments

Right now in join [many anyChar, literal "hi", many anyChar] the first many anyChar consumes the whole text, leaving an eof for the literal "hi", which fails.

The version that "gives back as needed" might be either a separate builtin, since it's less efficient:

Pattern.star : Pattern a -> Pattern a

Or we could just change the behavior of many.

A "reluctant" modifier would be good too, but is probably a separate issue.

pchiusano avatar Nov 15 '22 19:11 pchiusano