I'm looking for a definition of a functional f
which works correctly with varying arguments t
while it will be nested.
For example, I've the following code
f[g__[t__]] := g[t] + g[t - s]
For an input function in[t]
I'll get
f[in[t]]=in[t]+in[t-s]
So far so good. But I want to nest the functional like f[f[in[t]]
and I'm expecting
in[t]+2in[t-s]+in[t-2s]
as result. But what I get with the above definition is -s + 2 in[t] + 2 in[-s + t]
. My application is a cascaded FIR digital filter. The output of the first FIR is the input of the next one and so on.