164b3e41c13b
Merge.
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Wed, 11 Dec 2019 18:52:54 -0500 |
parents | f3327aa93670 (diff) a996dd9ad3eb (current diff) |
children | 765870ef20f7 |
branches/tags | (none) |
files |
Changes
--- a/src/iterate.lisp Wed Dec 11 18:51:49 2019 -0500 +++ b/src/iterate.lisp Wed Dec 11 18:52:54 2019 -0500 @@ -855,9 +855,9 @@ ,@(when result-type `(:result-type ,result-type)))))))) (defmacro-clause (FINDING-FIRST expr SUCH-THAT test &optional INTO var) - "Collect the first `expr`s for which `test` is true. + "Collect the first `expr` for which `test` is true. - Unlike vanilla `finding`, does not block further iteration. + Unlike vanilla `finding`, it does not block further iteration. If `test` is a sharp-quoted function, then it is called on `expr` instead of being evaluated and compared itself. @@ -888,7 +888,7 @@ `(finally (return (values ,@values)))) (defmacro-driver (FOR var-or-vars MATCHING regex AGAINST string &optional OVERLAP overlap? START start END end) - "Iterate over the matches of `regex` in `string`, binding `vars`. + "Iterate over the matches of `regex` in `string`, binding `var-or-vars`. `regex` must be a suitable argument for passing to `ppcre:create-scanner`. Note that `ppcre:create-scanner` accepts already-created scanners and returns
--- a/src/queues.lisp Wed Dec 11 18:51:49 2019 -0500 +++ b/src/queues.lisp Wed Dec 11 18:52:54 2019 -0500 @@ -10,7 +10,7 @@ (declaim - (ftype (function () + (ftype (function (&key (:initial-contents list)) (values queue &optional)) make-queue) (ftype (function (queue) @@ -27,9 +27,12 @@ queue-append)) -(defun-inlineable make-queue () +(defun-inlineable make-queue (&key initial-contents) "Allocate and return a fresh queue." - (make-queue%)) + (let ((queue (make-queue%))) + (when initial-contents + (queue-append queue initial-contents)) + queue)) (defun-inlineable queue-empty-p (queue) "Return whether `queue` is empty."