master
Ringo Wantanabe 6 years ago
parent 2db7b4765f
commit 602209deb6
No known key found for this signature in database
GPG Key ID: DDDD9B6759158726

@ -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)

Loading…
Cancel
Save