(defmacro combine (funlist &rest args)
(labels ((ml (fun rest) (if (symbolp fun) (cons fun rest) (cons 'funcall (cons fun rest))))
(make-cl (funlist)
(ml (car funlist) (if (endp (cdr funlist)) args (list (make-cl (cdr funlist)))))))
(make-cl funlist)))
(macroexpand-1 '(combine (f g h) x y z)) => (F (G (H X Y Z)))
I think it's a bit more useful when the first procedure can take a
variable number of arguments. I suppose this is a nice bit of
syntactic sugar when you have a lot of one argument procedures to
string together in a straight line, but how often does that happen?
Vladimir