diff options
author | Boutade <thegoofist@protonmail.com> | 2019-05-10 17:13:43 -0500 |
---|---|---|
committer | Boutade <thegoofist@protonmail.com> | 2019-05-10 17:13:43 -0500 |
commit | eb1c7ff85dce00538358ea7659a1f94988749824 (patch) | |
tree | 5e6e77325c89dd5f29b8978888bd63c75e94deb5 | |
parent | d66751967884277c7eec965a6a582a7f0bc81e9d (diff) |
realized <<let* should be called <<let
-rw-r--r-- | README.org | 2 | ||||
-rw-r--r-- | parzival.lisp | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -38,7 +38,7 @@ (defvar <simple-expression< - (<<let* ((arg1 <real<) + (<<let ((arg1 <real<) (op <op<) (arg2 <real<)) (<<result (funcall op arg1 arg2)))) diff --git a/parzival.lisp b/parzival.lisp index ba67be6..441ccc3 100644 --- a/parzival.lisp +++ b/parzival.lisp @@ -164,14 +164,14 @@ in then. If the parse fails the combinator else is run instead." (funcall fn result)))) -(defmacro <<let* (bindings expression) +(defmacro <<let (bindings expression) "Chain the results of several parses, failing whenever any of them fail, and combine them in a final parser. BINDINGS is a list of (variable parser) pairs. EXPRESSION should return a parser" (if (null bindings) expression `(<<bind ,(cadar bindings) (lambda (,(caar bindings)) - (<<let* ,(cdr bindings) ,expression))))) + (<<let ,(cdr bindings) ,expression))))) (defun <<and (parser1 parser2 &rest parsers) |