Splits a range into n pieces.