I’m trying to fill a vector `A`

of length `n`

with the dot-product of two vectors `x`

and `y`

like this

```
A = fill(sum(x[i]*y[i] for i in eachindex(x)), n)
```

For three vectors `x`

, `y`

, and `z`

, this can be written as

```
B = fill(sum(x[i]*y[i]*z[i] for i in eachindex(x)), n)
```

I want to generalize this for arbitrary number of vectors (two or more) using a function, e.g., without allocating extra temporary vectors. Is it easy to implement this or should I think of another way to do it?