Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

oops, use tuple not list for result pair

  • Loading branch information...
commit ff9bb82c9447f968d3dea5c70967c15d0ecbfb6f 1 parent 9de51a0
Darius Bacon authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  parsing/monadplus.py
2  parsing/monadplus.py
View
@@ -48,7 +48,7 @@ def __init__(self, parse_fn):
def __invert__(self):
return Peg(lambda s: [] if self(s) else [((), s)])
def __rshift__(self, f):
- return Peg(lambda s: [[(f(*vals),), s1] for vals, s1 in self(s)])
+ return Peg(lambda s: [(singleton(f(*vals)), s1) for vals,s1 in self(s)])
def __or__(self, peg): return alt(self, as_peg(peg))
def __ror__(self, peg): return alt(as_peg(peg), self)
Please sign in to comment.
Something went wrong with that request. Please try again.