[day2] - Adding generic types to partition function