Implement the generic replicate method. It should return a list containing multiple copies of the given value.
replicate