Quantcast
Channel: Applying several functions to the same argument - Mathematica Stack Exchange
Browsing index pages (7 articles)

Answer by user1066 for Applying several functions to the same argument

Although not more concise, it might be worth noting (as pointed out by Wagner, p196) that a pure function may be made listable using Function[] syntax (but not, as far as I am aware, with either...

View Article


Applying several functions to the same argument

Is there a more concise way of achieving the following result (possibly without d |->)?(d |-> (d@Exponent[#, Variables[expr]] &)) /@ {f1, f2}{f1[Exponent[#1, Variables[expr]]] &,...

View Article


Answer by MelaGo for Applying several functions to the same argument

Table[{Exponent[#, Variables[expr]]} & /. List -> f, {f, {f1, f2}}](* {f1[Exponent[#1, Variables[expr]]] &, f2[Exponent[#1, Variables[expr]]] &} *)

View Article

Answer by E. Chan-López for Applying several functions to the same argument

A dirty alternative:ComapApplyPureFunction[funcs_?VectorQ, pf_Function] := Module[{strpf},strpf = StringDelete[ToString[pf], "&"];ToExpression[#1 <> #2 & @@@ Thread[{ToString@#2@#1 &...

View Article

Answer by mikado for Applying several functions to the same argument

I think that in Version 14, you would be able to writefn = Comap[{f1, f2}]@*(Exponent[#, Variables[expr]] &)With this definition, you would the haveexpr = a + b + c(* a + b + c *)fn[expr](*...

View Article


Answer by lericr for Applying several functions to the same argument

If you literally just want shorter, you can just use a different version of Function:#@(Exponent[#, Variables[expr]] &) & /@ {f1, f2}

View Article

Answer by Edmund for Applying several functions to the same argument

You can use Composition.LonghandComposition[#, Exponent[#, Variables[expr]] &] & /@ {f1, f2}Shorthand#@*(Exponent[#, Variables[expr]] &) & /@ {f1, f2}Both give{f1@*(Exponent[#1,...

View Article
Browsing index pages (7 articles)


Latest Images