]> gitweb.factorcode.org Git - factor.git/commitdiff
parser-combinators: refactor <+>
authorchris.double <chris.double@double.co.nz>
Fri, 6 Oct 2006 03:36:05 +0000 (03:36 +0000)
committerchris.double <chris.double@double.co.nz>
Fri, 6 Oct 2006 03:36:05 +0000 (03:36 +0000)
contrib/parser-combinators/parser-combinators.factor

index 8edf77f54b041be8fb5a327a535fa49fde301958..9fe2a1d50ea5f354e986c65fd37899038593f2ac 100644 (file)
@@ -199,7 +199,7 @@ M: some-parser (parse) ( input parser -- result )
 : <+> ( parser -- parser )
   #! Return a parser that accepts one or more occurences of the original
   #! parser.
-  [  (<+>) call ] curry ;
+  dup <*> <&:> ;
 
 : (<?>) ( parser -- parser )
   #! Non-delayed implementation of <?>