One use could be applying dynamic programming to a function that takes 4 integer parameters f(int x,int y,int z,int w)
. To avoid calling this expensive function over and over again, you can cache the results in a 4D array, results[x][y][z][w]=f(x,y,z,w);
.
Now you just have to find an expensive integer function with arity of 4, oh, and a need for calculating it often...