You can do Array.fill instead of tabulate here.