summaryrefslogtreecommitdiff
path: root/extra.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'extra.lisp')
-rw-r--r--extra.lisp8
1 files changed, 8 insertions, 0 deletions
diff --git a/extra.lisp b/extra.lisp
index 6453751..b738da7 100644
--- a/extra.lisp
+++ b/extra.lisp
@@ -42,3 +42,11 @@
(defparameter whitespace
(optional (many (unit whitespace?))))
+
+(defun separated-list (p separator)
+ (comp ((v p)
+ (sep (optional separator))
+ (vn (if sep
+ (separated-list p separator)
+ nothing)))
+ (cons v vn)))