total-serialism icon indicating copy to clipboard operation
total-serialism copied to clipboard

Gen.fill() should accept single array as argument

Open tmhglnd opened this issue 3 years ago • 0 comments

Instead of providing seperate arguments per fill value it should also accept an array and generate from there:

Original with separate arguments

Gen.fill(10, 2, 15, 3, 20, 4);
//=> [ 10, 10, 15, 15, 15, 20, 20, 20, 20 ] 

When using an array it returns [ 0 ]

Gen.fill([10, 20, 2, 15, 3, 20, 4]);
//=> [ 0 ] 

This should actually result in

Gen.fill([10, 20, 2, 15, 3, 20, 4]);
//=> [ 10, 10, 15, 15, 15, 20, 20, 20, 20 ] 

tmhglnd avatar Nov 28 '21 20:11 tmhglnd