# Controlling HoldForm while mapping

If I execute

A = {Sin, Cos, Tan}
B = {ArcSin, ArcCos, ArcTan}
#[]@#[]@x & /@ Transpose[{A, B}]


the output is

{x,x,x}


which is to be expected. However, what I want is

{Sin[ArcSin[x]], Cos[ArcCos[x]], Tan[ArcTan[x]]}


Knowing that HoldForm[Sin[ArcSin[x]]] outputs Sin[ArcSin[x]], I tried

A = {Sin, Cos, Tan}
B = {ArcSin, ArcCos, ArcTan}
HoldForm[#[]@#[]@x] & /@ Transpose[{A, B}]


but this gives me

{{Sin,ArcSin}[][{Sin,ArcSin}[][x]],{Cos,ArcCos}[][{Cos,ArcCos}[][x]],{Tan,ArcTan}[][{Tan,ArcTan}[][x]]}


Much like Zach Braff's morning routine, this output is plagued by too much Hold.

How can I Hold the form of the expression without Holding the evaluation of Part?

Instead of Hold[], consider using Inactive[]:

MapThread[Inactive[#1][Inactive[#2][x]] &, {{Sin, Cos, Tan}, {ArcSin, ArcCos, ArcTan}}]


(equivalently, MapThread[Inactivate[#1[#2[x]]] &, {{Sin, Cos, Tan}, {ArcSin, ArcCos, ArcTan}}])

which would look like this on the front end: To remove Inactive[]:

Activate[%]
{x, x, x}


In older versions, you can try Defer[] or HoldForm[] instead of Inactive[], e.g.

HoldForm[Sin][HoldForm[ArcSin][x]]


and to remove the held evaluation,

ReleaseHold[%]


Several alternatives:

Defer[#@#2@x] & @@@ Transpose[{A, B}]
HoldForm[#@#2@x] & @@@ Transpose[{A, B}]
MapThread[Compose[HoldForm@#, HoldForm@#2, x] &, {A, B}]
HoldForm[a[b @ x]] /. Thread[{a, b} -> #] & /@ Transpose[{A, B}]
With[{a = #[], b = #[]}, HoldForm[a[b@x]]] & /@ Transpose[{A, B}]


all give

{Sin[ArcSin[x]],Cos[ArcCos[x]],Tan[ArcTan[x]]}

Another approach using operator forms (and avoiding slots, e.g., #):

Through @* Thread[HoldForm @* A @* B] @ x


{Sin[ArcSin[x]],Cos[ArcCos[x]],Tan[ArcTan[x]]}