Commit 374b5048 authored by Eric Timmons's avatar Eric Timmons
Browse files

Add safe-sort function that copies the sequence before sorting

parent ffd18452
......@@ -18,6 +18,7 @@
#:process-stream
#:retriable-error
#:run-program-augment-env-args
#:safe-sort
#:sort-plist
#:uri-to-string
#:url-port
......@@ -212,3 +213,7 @@ overwrites the value from ~default-ht~."
:do (push key out)
(push value out))
(nreverse out)))
(defun safe-sort (sequence predicate &rest args &key key)
(declare (ignore key))
(apply #'sort (copy-seq sequence) predicate args))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment