Suppose I have a given positive integer n. What are simple ways to create a list of length n consisting of all zeros exactly, that is, filled with the integer 0?
For example, if n has value 5, then I want to create [0, 0, 0, 0, 0] but without explicitly entering five zeros.
I think you should use zeros or fill rather than repeat. If you have a short list of constant length, known at compile time, you can consider a tuple or StaticArrays.jl.