Browse files

oops, use tuple not list for result pair

  • Loading branch information...
1 parent 9de51a0 commit ff9bb82c9447f968d3dea5c70967c15d0ecbfb6f @darius committed Apr 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 parsing/monadplus.py
View
2 parsing/monadplus.py
@@ -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)

0 comments on commit ff9bb82

Please sign in to comment.