|
|
@ -7,7 +7,7 @@
|
|
|
|
(defparameter *-utils-lisp* t)
|
|
|
|
(defparameter *-utils-lisp* t)
|
|
|
|
(defparameter *-utils-depends* '(#:cl-ppcre))
|
|
|
|
(defparameter *-utils-depends* '(#:cl-ppcre))
|
|
|
|
|
|
|
|
|
|
|
|
(defparameter *-utils-version* "0.1.2")
|
|
|
|
(defparameter *-utils-version* "0.1.3")
|
|
|
|
|
|
|
|
|
|
|
|
;;; -- Handle internal exporting --
|
|
|
|
;;; -- Handle internal exporting --
|
|
|
|
|
|
|
|
|
|
|
@ -63,6 +63,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
;;; --- actual (exported) code goes here ---
|
|
|
|
;;; --- actual (exported) code goes here ---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun where (expr items)
|
|
|
|
|
|
|
|
(mapcan #'(lambda (x)
|
|
|
|
|
|
|
|
(when (funcall expr x) x))
|
|
|
|
|
|
|
|
items))
|
|
|
|
|
|
|
|
|
|
|
|
(defun true (f)
|
|
|
|
(defun true (f)
|
|
|
|
(not (null f)))
|
|
|
|
(not (null f)))
|
|
|
|
|
|
|
|
|
|
|
@ -97,7 +102,7 @@
|
|
|
|
(defun rand-in (l &key (random #'random) )
|
|
|
|
(defun rand-in (l &key (random #'random) )
|
|
|
|
"Random member of, slide right if nil"
|
|
|
|
"Random member of, slide right if nil"
|
|
|
|
(let ((rng (funcall random (list-length l))))
|
|
|
|
(let ((rng (funcall random (list-length l))))
|
|
|
|
(let ((nl (nth rng l)))
|
|
|
|
(let ((nl (nthcdr rng l)))
|
|
|
|
(until (pop nl)))))
|
|
|
|
(until (pop nl)))))
|
|
|
|
|
|
|
|
|
|
|
|
(defun regex-replace-many (str matches replwith)
|
|
|
|
(defun regex-replace-many (str matches replwith)
|
|
|
|