Dear Erlangers,<div><br></div><div>As known, Erlang is born with inherent distributed-computing properties and is good for lists manipulation, but currently I'm encountering a problem that I don't know how to do with Erlang in an efficient way.</div>
<div><br></div><div>I hope to build a cubic matrix with I x J x K dimension (I,J,K are integers and >= 2), for which the origin (index [1,1,1], or [0,0,0] for c/java/lisp) is assigned with an initial value 1, and then the initial value is unidirectionally message-passed to adjacent nodes. Every node gets a value that is the sum of afferent messages and continue to pass its value deeper forward, until the far-most node (with index [I,J,K]) gets a value. Taking a 2x2x2 dimensional scenario as an example (in the attached picture, the vertices of the cube represent the nodes of the matrix), we will get a final matrix as [ [ [1,1], [1,2] ], [ [1,2], [2,6] ] ]. </div>
<div><br></div><div>To implement this, I'll have two functions: gen_cubic([I,J,K]) -> list().  get_value([i,j,k], Cubic::list()) -> number().</div><div><br></div><div>BTW: I heard of that Lisp is good for this kind of matter, but when I tried to learn List yesterday I found it's so hard to read and the syntax is not so natural as Erlang. So, if someone have more time, please give your insights comparing these two language. I would appreciate that.</div>
<div><br></div><div>Thank you!</div><div>Barco</div>