Composition is sometimes useful for clarity of a code. For the same purpose I try to Apply(@@) functions as often as it is possible.
My question is how to combine Composition with Apply, or, to be more precise, is there any simpler way than one I'm going to show (there is no Composition :)):
Fold[#2@@#1&, arg, {f1, f2,...}]
alternatively:
Fold[Apply[#2,#1]&, arg, {f1, f2,...}]
So for example:
Fold[#2 @@ #1 &, {1, 2}, {{##} &, {#2, #1} &, {#1, 0, #2} &}]
{2, 0, 1}
Fold[], so I'm not posting this as an answer:(Composition @@ Function[f, Apply[f, #] &] /@ {{#1, 0, #2} &, {#2, #1} &, {##1} &})[{1, 2}]. – J. M.'s missing motivation Jun 20 '13 at 10:04Composition[f1,f2..., Method->k][__]wherekcan beApply, Map, MapIndexedetc. – Kuba Jun 20 '13 at 10:15Composition[Apply @@ # &, Reverse, List]. – Leonid Shifrin Jun 20 '13 at 10:45