Tamas Papp writes:
> How would you name
>
> (defun unnamed (operator &rest functions)
> "Return a closure that applies OPERATOR on the value returned by calling
> functions on its single argument."
> (lambda (x)
> (apply operator (mapcar (lambda (f) (funcall f x)) functions))))
>
> ?
>
> Examples:
>
> (unnamed #'+ #'f #'g) ; would be f+g in math
That is composition of functions. The outer function has arbitrary
arity, so there can be many inner functions that accept the same
arguments.
The name compose itself is somewhat taken to mean (+ (f (g arg)))
instead of (+ (f arg) (g arg)) but some variant name could be used.
(composen #'p #'f #'g) to suggest that there are n inner functions?
(compose* ...) to suggest repetition, as in Kleene start?
(compose... #'p #'f #'g)?
(compose-with-many-inner-functions #'p #'f #'g)
Or (compose1 #'p #'f #'g) to suggest only one _composition_ so that
the inner functions need to be combined in some _other_ way?