[erlang-questions] Tuples referencing each other problem

Grzegorz Junka <>
Sun Sep 17 09:27:54 CEST 2017

Is it possible to create two tuples that reference each other in Erlang? 
Something like:

T1 = {T2}
T2 = {T1}

My understanding is that when using pointers (i.e. in C++) one needs to 
mutate the first tuple in order to store the reference to the second 
tuple once it has been created.

This is of course a generalization of a more specific problem of 
creating liked structures like a double linked list or a tree with leafs 
containing links to each other. Are there any techniques that would 
allow creating algorithms operating on such structures in Erlang?


More information about the erlang-questions mailing list