[alexandria-devel] DX declaration in COMPOSE &c
10 Mar
2008
10 Mar
'08
12:48 p.m.
;;; Isn't the DYNAMIC-EXTENT declaration wrong on ;;; ;;; (flet ((id (&rest args) args)) ;;; (compose #'id #'id)) ;;; ;;; ? (defun compose (function &rest more-functions) "Returns a function composed of FUNCTION and MORE-FUNCTIONS that applies its arguments to to each in turn, starting from the rightmost of MORE-FUNCTIONS, and then calling the next one with the primary value of the last." (declare (optimize (speed 3) (safety 1) (debug 1))) (reduce (lambda (f g) (lambda (&rest arguments) (declare (dynamic-extent arguments)) (funcall f (apply g arguments)))) more-functions :initial-value function)) Similiar for MULTIPLE-VALUE-COMPOSE, CURRY, and RCURRY. -T.
6176
Age (days ago)
6176
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tobias C. Rittweiler