I want to be able to write a Function (Operator), that gets 2 arguments. The first argument specifies the kind of "operation", the second the function on which to apply the operation. It should work with $\mathbb{R}\longrightarrow\mathbb{R}^n$ functions.
I have defined a function
myF[t_]:= {Sin[t],Cos[t]}
so a function that maps $\mathbb{R}\longrightarrow\mathbb{R}^n,$ for the case $n=2$.
Now I want to define another function, that evaluates myF
at 0, whenever I pass evaluate
as (first) argument.
I tried the following
myOperator[evaluate,Fun_[t_]]:=Map[t=0][Fun]
However, the output is
myOperator[evaluate,{0,1}]
So the evaluation happens, but the result is not just the vector... Can anyone help me?
Edit: Of course, I have also tried
myOperator[evaluate,Fun_[t_]]:=Fun[0]
myOperator[evaluate_, fun_]: fun[0]
. Read the docs so you can understand how Mathematica functions are actually defined $\endgroup$t
? LikemyOperator[foo,...]= Integrate[fun,{t,0,3}]
$\endgroup$