Tullio without product

How can I replace the * with a function?

@tullio c := a[i]*b[i]

a is an array of symbolic differential and b is an array of symbolic functions.
I would like to get:

a[1](b[1])+a[2](b[2])

Thank you

Should just work:

julia> a = [sin, cos]; b = [pi/6, pi/4];

julia> @tullio c := a[i](b[i])
1.2071067811865475

julia> sum(b .|> a)
1.2071067811865475
6 Likes