376 |
|
|
377 |
(defun compose (&rest fns) |
(defun compose (&rest fns) |
378 |
(let ((rfns (reverse fns))) |
(let ((rfns (reverse fns))) |
379 |
#'(lambda (x) (loop for f in rfns do (setf x (funcall f x))) x))) |
#'(lambda (x) (loop for f of-type function |
380 |
|
in rfns do (setf x (funcall f x))) x))) |
381 |
|
|
382 |
(defun evendigitp (c) |
(defun evendigitp (c) |
383 |
(notnot (find c "02468"))) |
(notnot (find c "02468"))) |
1444 |
(not (not (typep element type)))) |
(not (not (typep element type)))) |
1445 |
|
|
1446 |
(defun applyf (fn &rest args) |
(defun applyf (fn &rest args) |
1447 |
#'(lambda (&rest more-args) (apply fn (append args more-args)))) |
(etypecase fn |
1448 |
|
(symbol |
1449 |
|
#'(lambda (&rest more-args) (apply (the symbol fn) (append args more-args)))) |
1450 |
|
(function |
1451 |
|
#'(lambda (&rest more-args) (apply (the function fn) (append args more-args)))))) |
1452 |
|
|
1453 |
(defun slot-boundp* (object slot) |
(defun slot-boundp* (object slot) |
1454 |
(notnot (slot-boundp object slot))) |
(notnot (slot-boundp object slot))) |