golfing with curry
This commit is contained in:
parent
b516cecff2
commit
8d1e8c0760
1 changed files with 1 additions and 3 deletions
|
@ -42,9 +42,7 @@ generate :: [Token op] -> Matcher op
|
|||
generate ts = generate' Any ts
|
||||
generate' :: Matcher op -> [Token op] -> Matcher op
|
||||
generate' m [] = m
|
||||
generate' m ts = generate' m' rest
|
||||
where
|
||||
(m', rest) = consume m ts
|
||||
generate' m ts = uncurry generate' $ consume m ts
|
||||
|
||||
{- Consumes one or more Tokens, constructs a new Matcher,
|
||||
- and returns unconsumed Tokens. -}
|
||||
|
|
Loading…
Reference in a new issue