In Haskell, if I wanted to get a 10 element list which only contained the number 5, I could do something like this:
take 10 $ repeat 5
Outp
See repmat in the documentation.
B = repmat(5,1,10)