Apply a function to matrix elements?

Hello,
I’m trying to apply a function to all of the elements of a 2D matrix. The catch is that the some of the function inputs are other elements of the matrix. In other words, the function to calculate the element in row 3, column 4 uses the values in row 2, columns 3 - 5.

This is easy to do with procedural programming (loops), but I’m trying to do it using functional programming techniques.

Thanks,
Tony

If the function does not use the value of an element to compute a new value then it does not seem like Map is the right function to use. From the pattern described maybe you are trying to implement an elementary cellular automata?

Thanks Rohit. I’ll look into cellular automata.