roll function rolls the contents of a list n times