Abstract over index type in DP.