diff options
-rw-r--r-- | extra.lisp | 8 | ||||
-rw-r--r-- | package.lisp | 3 |
2 files changed, 10 insertions, 1 deletions
@@ -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))) diff --git a/package.lisp b/package.lisp index 7067dfb..2b64c6f 100644 --- a/package.lisp +++ b/package.lisp @@ -16,4 +16,5 @@ #:many #:repeat #:whitespace? - #:whitespace)) + #:whitespace + #:separated-list)) |