From 94dda7a8e56d6db537e307b1ec3cf59b8d70a629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Thu, 3 Nov 2022 03:37:49 -0300 Subject: Add empty value feature to comp --- parser.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'parser.lisp') diff --git a/parser.lisp b/parser.lisp index 37abb75..30c68fd 100644 --- a/parser.lisp +++ b/parser.lisp @@ -54,7 +54,9 @@ `(new (progn ,@body)) (let ((v (first (car bindings))) (p (second (car bindings)))) - `(bind ,p (lambda (,v) (comp ,(cdr bindings) ,@body)))))) + (if (eq v '_) + `(bind ,p (lambda () (comp ,(cdr bindings) ,@body))) + `(bind ,p (lambda (,v) (comp ,(cdr bindings) ,@body))))))) (defparameter nothing (new nil)) -- cgit v1.2.3