Commits

llibra  committed 38fa4a6

Refactored SEP-BY1 and MANY1 with MLET*.

This is a change for #20.

  • Participants
  • Parent commits 536044b

Comments (0)

Files changed (1)

File src/combinator.lisp

           (unit nil)))
 
 (defun sep-by1 (parser sep)
-  (seq/bind (x  <- parser)
-            (xs <- (many (seqn sep parser)))
-            (unit (cons x xs))))
+  (mlet* ((x parser)
+          (xs (many (seqn sep parser))))
+    (unit (cons x xs))))
 
 (defun many1 (parser)
-  (seq/bind (r  <- parser)
-            (rs <- (many parser))
-            (unit (cons r rs))))
+  (mlet* ((r parser)
+          (rs (many parser)))
+    (unit (cons r rs))))
 
 (defun skip-many1 (parser)
   (seqn parser (skip-many parser)))